diff --git a/flake.nix b/flake.nix index b61e05e..61755c5 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,6 @@ system = "x86_64-linux"; # change if needed pkgs = import nixpkgs { inherit system; }; pkgList = with pkgs; [ - # LSPs lua-language-server vscode-langservers-extracted diff --git a/lua/plugins/completion/lspconfig.lua b/lua/plugins/completion/lspconfig.lua index 6985c7d..51c2112 100644 --- a/lua/plugins/completion/lspconfig.lua +++ b/lua/plugins/completion/lspconfig.lua @@ -1,7 +1,6 @@ vim.pack.add({ { src = "https://github.com/neovim/nvim-lspconfig", name = "lspconfig" }, { src = "https://github.com/saghen/blink.cmp", name = "blink" }, - { src = "https://github.com/folke/lazydev.nvim", name = "lazydev" }, }) vim.lsp.config("lua_ls", { @@ -81,9 +80,26 @@ require("blink.cmp").setup({ }, }) -vim.api.nvim_create_autocmd("FileType", { +vim.api.nvim_create_autocmd("FileType", { -- Lazy load lazydev when in lua file (no pun intended) pattern = "lua", callback = function() + vim.pack.add({ + { src = "https://github.com/folke/lazydev.nvim", name = "lazydev" }, + }) require("lazydev").setup() + require("blink.cmp").setup({ -- Reload blink with lazydev as a source + sources = { + -- add lazydev to your completion providers + default = { "lazydev", "lsp", "path", "snippets", "buffer" }, + providers = { + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + -- make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100, + }, + }, + }, + }) end, }) diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index d79e3f3..5d82fd3 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -80,6 +80,30 @@ "rev": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7", "src": "https://github.com/Aasim-A/scrollEOF.nvim" }, + "telescope": { + "rev": "471eebb1037899fd942cc0f52c012f8773505da1", + "src": "https://github.com/nvim-telescope/telescope.nvim" + }, + "telescope-file-browser": { + "rev": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e", + "src": "https://github.com/nvim-telescope/telescope-file-browser.nvim" + }, + "telescope-fzf": { + "rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c", + "src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + "telescope-nerdy": { + "rev": "97b0914dece80204a777f04c94b9980da0f7ac88", + "src": "https://github.com/2kabhishek/nerdy.nvim" + }, + "telescope-symbols": { + "rev": "a6d0127a53d39b9fc2af75bd169d288166118aec", + "src": "https://github.com/nvim-telescope/telescope-symbols.nvim" + }, + "telescope-ui-select": { + "rev": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2", + "src": "https://github.com/nvim-telescope/telescope-ui-select.nvim" + }, "treesitter": { "rev": "4916d6592ede8c07973490d9322f187e07dfefac", "src": "https://github.com/nvim-treesitter/nvim-treesitter"