diff --git a/lazy-lock.json b/lazy-lock.json index 3147d38..440edd9 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,20 +3,15 @@ "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "SchemaStore.nvim": { "branch": "main", "commit": "5a2fff7d0a51b79164787ddfc117f7f79784cb55" }, "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, + "blink.cmp": { "branch": "main", "commit": "18b352d12b35bca148427b607098df14b75a218f" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "catppuccin": { "branch": "main", "commit": "4bb938bbba41d306db18bf0eb0633a5f28fd7ba0" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "drop.nvim": { "branch": "main", "commit": "d2376ac1635eb71af699eda603f3dfe87c29a70d" }, "dropbar.nvim": { "branch": "master", "commit": "70431765f36f768d1d93b5e4f5d428bc6d3e9a65" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzf-lua": { "branch": "main", "commit": "3d3e4bda8cc60f00bcce7046a78581ee1f6362a4" }, "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, "grug-far.nvim": { "branch": "main", "commit": "3a8690461afac34c0e5bacb0f7b4bc3066aab665" }, @@ -34,6 +29,7 @@ "mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" }, "mini.nvim": { "branch": "main", "commit": "dc1775613f672e6a804577945813353c5c4e6fe5" }, "mini.pairs": { "branch": "main", "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" }, + "neo-tree.nvim": { "branch": "main", "commit": "94c8ec36da52af0ea0128012e12abe05c26ef840" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, "neogit": { "branch": "master", "commit": "63124cf520ff24d09deb3b850e053908ab0fc66a" }, "neovim-project": { "branch": "main", "commit": "a37f702103acda57735b06bd9c1a056fb73f011f" }, diff --git a/lazyvim.json b/lazyvim.json index 8e6b0ec..a28f5eb 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "6520" + "NEWS.md": "10960" }, - "version": 6 + "version": 8 } \ No newline at end of file diff --git a/lua/plugins/mason-lsp-config.lua b/lua/plugins/mason-lsp-config.lua index e5a5c88..7cb62ae 100644 --- a/lua/plugins/mason-lsp-config.lua +++ b/lua/plugins/mason-lsp-config.lua @@ -1,5 +1,80 @@ return { + { "williamboman/mason.nvim", + config = function() + require("mason").setup({ + ui = { + border = "rounded", + }, + }) + end, + }, + + { "williamboman/mason-lspconfig.nvim", + dependencies = { "williamboman/mason.nvim" }, + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "lua_ls", -- Lua + "pyright", -- Python + "tsserver", -- TypeScript/JavaScript + "clangd", -- C/C++ + "rust_analyzer", -- Rust + "gopls", -- Go + }, + automatic_installation = true, + }) + end, + }, + + { "neovim/nvim-lspconfig", + dependencies = { "williamboman/mason-lspconfig.nvim" }, + config = function() + local lspconfig = require("lspconfig") + + -- Language Server Configurations + local servers = { + lua_ls = { + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, -- Avoid undefined 'vim' warnings + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + }, + }, + }, + pyright = {}, + tsserver = {}, + clangd = {}, + rust_analyzer = {}, + gopls = {}, + } + + for server, config in pairs(servers) do + lspconfig[server].setup(config) + end + + -- LSP Keybindings + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(event) + local opts = { buffer = event.buf, noremap = true, silent = true } + + -- Keymaps + vim.keymap.set("n", "gd", "lua vim.lsp.buf.definition()", opts) + vim.keymap.set("n", "gr", "lua vim.lsp.buf.references()", opts) + vim.keymap.set("n", "K", "lua vim.lsp.buf.hover()", opts) + vim.keymap.set("n", "rn", "lua vim.lsp.buf.rename()", opts) + vim.keymap.set("n", "ca", "lua vim.lsp.buf.code_action()", opts) + vim.keymap.set("n", "f", "lua vim.lsp.buf.format({ async = true })", opts) + end, + }) + end, + }, } + diff --git a/lua/plugins/nvim-luadev.lua b/lua/plugins/nvim-luadev.lua new file mode 100644 index 0000000..3a0601f --- /dev/null +++ b/lua/plugins/nvim-luadev.lua @@ -0,0 +1,9 @@ +return { + { + "folke/neodev.nvim", + opts = { + library = { plugins = { "nvim-telescope", "lazy.nvim" }, types = true }, + }, + }, +} + diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 947c38c..64447d8 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -41,7 +41,6 @@ return { build = "make", config = function() require("telescope").load_extension("fzf") - require("telescope.builtin").live_grep({ search_dirs = { "~/.ssh/known_hosts" } }) end, }, }, diff --git a/stylua.toml b/stylua.toml index bd3642f..421c3d9 100644 --- a/stylua.toml +++ b/stylua.toml @@ -1,3 +1,3 @@ -ndent_type = "Spaces" +indent_type = "Spaces" indent_width = 2 column_width = 80