updated lsp with autocomplete

This commit is contained in:
venus
2026-03-10 16:34:31 -05:00
parent be84313c2c
commit 63bd661602
6 changed files with 46 additions and 17 deletions

View File

@@ -17,7 +17,7 @@ vim.keymap.set("n", "<leader>l", function()
-- Save position and buffer context
local term = require("toggleterm.terminal").get(1)
if term then
local original_window = vim.api.nvim_get_current_win()
local original_window = vim.api.nvim_get_current_win()
local saved_view = vim.fn.winsaveview()
-- Using \r (carriage return) or \n\n often bypasses shell interceptors
term:send("clear\r")
@@ -51,4 +51,4 @@ vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
vim.keymap.set("n", "<leader>e", "<cmd>NERDTreeToggle<CR>", {desc = 'open [E]xplorer'})
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>", {desc = 'open [E]xplorer'})

View File

@@ -5,14 +5,8 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.have_nerd_font = true
-- netrw
vim.g.netrw_liststyle = 3 --tree view
vim.g.netrw_banner = 1
vim.g.netrw_winsize = 70 -- Set the width of the "drawer"
vim.g.netrw_browse_split = 4 -- Open files in previous window. This emulates the typical "drawer" behavior
vim.g.netrw_preview = 1 -- opens in vertical if no open buffer
vim.g.netrw_altv = 1 -- Create the split of the Netrw window to the left
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- [[Setting options]]
vim.o.number = true -- Make line numbers default

View File

@@ -1,7 +1,25 @@
return {
{
"neovim/nvim-lspconfig",
dependencies = {
{ "mason-org/mason.nvim", config = true }, -- The "App Store"
{ "mason-org/mason-lspconfig.nvim", config = true }, -- The "Bridge"
},
}
},
{
'saghen/blink.cmp',
version = '*', -- Downloads pre-built binaries (fast!)
opts = {
keymap = {
preset = 'none',
['<CR>'] = { 'select_next', 'fallback' },
['<S-CR>'] = { 'select_prev', 'fallback' },
['<Tab>'] = { 'accept', 'fallback' },
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
},
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
},
},
}

18
lua/plugins/nerdtree.lua Normal file
View File

@@ -0,0 +1,18 @@
return {
'nvim-tree/nvim-tree.lua',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require("nvim-tree").setup({
view = {
side = "left",
width = 30,
},
actions = {
open_file = {
-- This is the "open in adjacent pane" equivalent
window_picker = { enable = true },
},
},
})
end,
}