From ffe936149c199b9a169b645dac3a6bbf933df823 Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Tue, 15 Oct 2024 13:24:10 -0400 Subject: nvim: update config --- .config/nvim/lua/plugins/lsp.lua | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to '.config/nvim/lua/plugins/lsp.lua') diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 4bb7659..7a67265 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -16,6 +16,9 @@ return { "gopls", "lua_ls", "pylsp", + "ts_ls", + "cssls", + "html", } for _, lsp in ipairs(lsps) do @@ -24,29 +27,24 @@ return { local wk = require("which-key") wk.register({ - ["[d"] = { vim.diagnostic.goto_prev, "Previous diagnostic" }, - ["]d"] = { vim.diagnostic.goto_next, "Next diagnostic" }, + { "[d", vim.diagnostic.goto_prev, desc = "Previous diagnostic" }, + { "]d", vim.diagnostic.goto_next, desc = "Next diagnostic" }, }) vim.api.nvim_create_autocmd("LspAttach", { group = vim.api.nvim_create_augroup("UserLspConfig", {}), callback = function(ev) wk.register({ - gD = { vim.lsp.buf.declaration, "Go to declaration" }, - gd = { vim.lsp.buf.definition, "Go to definition" }, - gr = { vim.lsp.buf.references, "Go to references" }, - gi = { vim.lsp.buf.implementation, "Go to implementation" }, - K = { vim.lsp.buf.hover, "Show LSP hover info" }, - [""] = { vim.lsp.buf.signature_help, "Show signature help" }, - ["D"] = { vim.lsp.buf.type_definition, "Type definition" }, - ["rn"] = { vim.lsp.buf.rename, "Rename" }, - ["ca"] = { vim.lsp.buf.code_action, "Code action" }, - ["F"] = { - function() - vim.lsp.buf.format({ async = true }) - end, - "Format buffer", - }, + { "gD", vim.lsp.buf.declaration, desc = "Go to declaration" }, + { "gd", vim.lsp.buf.definition, desc = "Go to definition" }, + { "gr", vim.lsp.buf.references, desc = "Go to references" }, + { "gi", vim.lsp.buf.implementation, desc = "Go to implementation" }, + { "K", vim.lsp.buf.hover, desc = "Show LSP hover info" }, + { "", vim.lsp.buf.signature_help, desc = "Show signature help" }, + { "D", vim.lsp.buf.type_definition, desc = "Type definition" }, + { "rn", vim.lsp.buf.rename, desc = "Rename" }, + { "ca", vim.lsp.buf.code_action, desc = "Code action" }, + { "F", function() vim.lsp.buf.format({ async = true }) end, desc = "Format buffer" }, ["w"] = { name = "+LSP workspace", a = { vim.lsp.buf.add_workspace_folder, "Add workspace folder" }, -- cgit v1.2.3