diff options
| author | cryxtalix <fgx8p9t@protonmail.com> | 2026-05-09 00:15:07 +0800 |
|---|---|---|
| committer | cryxtalix <fgx8p9t@protonmail.com> | 2026-05-09 00:15:07 +0800 |
| commit | 8fbf7c2a9ce92b97941bff2c8b52c1d52d9834d2 (patch) | |
| tree | aa4cb6f169758fb9abdcf5b378a1a8ccc6902344 /.config/nvim_pack/lua/configs/lsp.lua | |
| parent | 1302056eddd9a69ea2d0ffdf8bedd8582fb5a907 (diff) | |
Update
Diffstat (limited to '.config/nvim_pack/lua/configs/lsp.lua')
| -rw-r--r-- | .config/nvim_pack/lua/configs/lsp.lua | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/.config/nvim_pack/lua/configs/lsp.lua b/.config/nvim_pack/lua/configs/lsp.lua deleted file mode 100644 index 7acbeba..0000000 --- a/.config/nvim_pack/lua/configs/lsp.lua +++ /dev/null @@ -1,48 +0,0 @@ --- Language server for specified languages --- Hover with 'K' --- Goto definition with :Goto --- Open code action with :Codeact - -local servers = { - "lua_ls", "bashls", "clangd", "marksman", "pyright", "lemminx", -} - -vim.pack.add({ - { - src = "https://github.com/mason-org/mason.nvim.git", - version = 'main', - }, - { - src = "https://github.com/mason-org/mason-lspconfig.nvim.git", - version = 'main', - }, -}) - -require("mason").setup({}) -require("mason-lspconfig").setup({ - ensure_installed = servers, - automatic_installation = true, - automatic_enable = true, -}) - --- Key mapping --- Hover for definition -vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - --- Move to definition -vim.api.nvim_create_user_command( - "Goto", - function() - vim.lsp.buf.definition() - end, - {} -) - --- Code action -vim.api.nvim_create_user_command( - "Codeact", - function() - vim.lsp.buf.code_action() - end, - {} -) |
