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/lazy-lock.json | 34 ++++++++++++++++----------------- .config/nvim/lua/plugins/catppuccin.lua | 2 +- .config/nvim/lua/plugins/cmp.lua | 1 - .config/nvim/lua/plugins/editor.lua | 1 - .config/nvim/lua/plugins/lsp.lua | 32 +++++++++++++++---------------- .config/nvim/lua/plugins/which-key.lua | 2 +- 6 files changed, 34 insertions(+), 38 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 69e439c..9458c04 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,22 +1,22 @@ { - "LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" }, - "catppuccin": { "branch": "main", "commit": "490078b1593c6609e6a50ad5001e7902ea601824" }, + "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, + "catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "diffview.nvim": { "branch": "main", "commit": "db97e667e03294bfa9f15e544e78f3082247bf79" }, - "friendly-snippets": { "branch": "main", "commit": "377d45475b49e37460a902d6d569d2093d4037d0" }, - "lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" }, - "neogit": { "branch": "master", "commit": "b3c15c5dba0e76a3524029785d02fc897149259d" }, - "nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" }, - "nvim-lspconfig": { "branch": "master", "commit": "0d29cad8de3b2c654315203fc1fe12fde722a18a" }, - "nvim-surround": { "branch": "main", "commit": "1c2ef599abeeb98e40706830bcd27e90e259367a" }, - "nvim-treesitter": { "branch": "master", "commit": "add1864bbf2d3b8e789ec6b4715bb5a4073e3b60" }, - "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, - "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, - "telescope.nvim": { "branch": "master", "commit": "2d92125620417fbea82ec30303823e3cd69e90e8" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" }, + "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, + "neogit": { "branch": "master", "commit": "75ee709d18625a94aef90d94ccac4e562c9a0046" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-lspconfig": { "branch": "master", "commit": "0678aa439b82965daf03679cd146e84f10e299c3" }, + "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, + "nvim-treesitter": { "branch": "master", "commit": "140f534ce9c02189921b80f5c8a68ab9e3f92ce8" }, + "nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope.nvim": { "branch": "master", "commit": "cb3f98d935842836cc115e8c9e4b38c1380fbb6b" }, "vim-buftabline": { "branch": "master", "commit": "73b9ef5dcb6cdf6488bc88adb382f20bc3e3262a" }, - "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" } + "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } } \ No newline at end of file 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" }, - [""] = { 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" }, 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({ - ["f"] = { name = "+Telescope" }, + { "f", group = "Telescope" }, }) end, } -- cgit v1.2.3