diff options
| author | Sam Nystrom <sam@samnystrom.dev> | 2024-10-15 13:24:10 -0400 |
|---|---|---|
| committer | Sam Nystrom <sam@samnystrom.dev> | 2024-10-15 13:24:10 -0400 |
| commit | ffe936149c199b9a169b645dac3a6bbf933df823 (patch) | |
| tree | 65c4e30ca37c8c50e1ecd26a3f285bfc249b42a0 /.config/nvim/lua/plugins | |
| parent | a96a537c326d505f54d2d173b4710fca5d3de673 (diff) | |
nvim: update config
Diffstat (limited to '.config/nvim/lua/plugins')
| -rw-r--r-- | .config/nvim/lua/plugins/catppuccin.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/cmp.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/editor.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 32 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/which-key.lua | 2 |
5 files changed, 17 insertions, 21 deletions
diff --git a/.config/nvim/lua/plugins/catppuccin.lua b/.config/nvim/lua/plugins/catppuccin.lua index 9d9bce5..fa3a288 100644 --- a/.config/nvim/lua/plugins/catppuccin.lua +++ b/.config/nvim/lua/plugins/catppuccin.lua @@ -5,7 +5,7 @@ return { priority = 1000, config = function() require("catppuccin").setup({ - flavour = "macchiato", + flavour = "mocha", integrations = { neogit = true, which_key = true, diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index edc5091..fc897eb 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -93,4 +93,3 @@ return { end, }, } - diff --git a/.config/nvim/lua/plugins/editor.lua b/.config/nvim/lua/plugins/editor.lua index 4dde1dc..7004143 100644 --- a/.config/nvim/lua/plugins/editor.lua +++ b/.config/nvim/lua/plugins/editor.lua @@ -2,4 +2,3 @@ return { { "ap/vim-buftabline", event = "VeryLazy" }, { "kylechui/nvim-surround", event = "VeryLazy", opts = {} }, } - 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" }, - ["<C-k>"] = { vim.lsp.buf.signature_help, "Show signature help" }, - ["<leader>D"] = { vim.lsp.buf.type_definition, "Type definition" }, - ["<leader>rn"] = { vim.lsp.buf.rename, "Rename" }, - ["<leader>ca"] = { vim.lsp.buf.code_action, "Code action" }, - ["<leader>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" }, + { "<C-k>", vim.lsp.buf.signature_help, desc = "Show signature help" }, + { "<leader>D", vim.lsp.buf.type_definition, desc = "Type definition" }, + { "<leader>rn", vim.lsp.buf.rename, desc = "Rename" }, + { "<leader>ca", vim.lsp.buf.code_action, desc = "Code action" }, + { "<leader>F", function() vim.lsp.buf.format({ async = true }) end, desc = "Format buffer" }, ["<leader>w"] = { name = "+LSP workspace", a = { vim.lsp.buf.add_workspace_folder, "Add workspace folder" }, diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 2a27a2c..f636915 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -3,7 +3,7 @@ return { event = "VeryLazy", config = function() require("which-key").register({ - ["<leader>f"] = { name = "+Telescope" }, + { "<leader>f", group = "Telescope" }, }) end, } |
