diff --git a/lazy-lock.json b/lazy-lock.json index 3c1d318..f58c89a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,31 +1,31 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "catppuccin": { "branch": "main", "commit": "0303a7208dba448c459767486a38a6ec05c4216b" }, + "catppuccin": { "branch": "main", "commit": "79e2049a0fdf7ec840f8463fe1d962c94493196b" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lspsaga.nvim": { "branch": "main", "commit": "3e33a6a6c5d379f3d4fae77fae6b53b762a0a30f" }, + "lspsaga.nvim": { "branch": "main", "commit": "cf6fc9473bba1d332eda9887855ea29ed9b37701" }, "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-registry": { "branch": "main", "commit": "7ca6d40afb94c452d779b48c59a7fa87f804e434" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, - "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, - "nvim-lspconfig": { "branch": "master", "commit": "229b79051b380377664edc4cbd534930154921a1" }, - "nvim-tree.lua": { "branch": "master", "commit": "85d1145ac71c1b8e1423862c78165a1f609faf60" }, - "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" }, + "nvim-lspconfig": { "branch": "master", "commit": "7ab79bb1b57160a537f427ac8a6026102f12b701" }, + "nvim-tree.lua": { "branch": "master", "commit": "531b807b8f0d6f75016a0ee1e0cd5ce2086e9d95" }, + "nvim-treesitter": { "branch": "main", "commit": "61df84986b4b4ec469ee745a182e433d49f8c27e" }, + "nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" }, "onedarkpro.nvim": { "branch": "main", "commit": "f5fddfd5122fe00421e199151ae4fe8571a02898" }, "outline.nvim": { "branch": "main", "commit": "2a132953b944561d45b52e4541ebfff71934a742" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, - "telescope.nvim": { "branch": "master", "commit": "7d324792b7943e4aa16ad007212e6acc6f9fe335" }, + "telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, - "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, + "vim-illuminate": { "branch": "master", "commit": "91313e598ca62e110bc71535c49069b66b9883c9" }, "vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }, - "vimtex": { "branch": "master", "commit": "24e229914182ff301496a3e2c4214b28c4928d3f" }, + "vimtex": { "branch": "master", "commit": "853eb587873a7061a083655578be56dd8027b834" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/funsi/plugins/lsp.lua b/lua/funsi/plugins/lsp.lua index 4cf516a..e1f5e74 100644 --- a/lua/funsi/plugins/lsp.lua +++ b/lua/funsi/plugins/lsp.lua @@ -60,6 +60,8 @@ return { { vim.opt.signcolumn = 'yes' end, config = function() + vim.diagnostic.config({ update_in_insert = true }) + -- Add cmp_nvim_lsp capabilities settings to lspconfig -- This should be executed before you configure any language server local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -76,7 +78,7 @@ return { { group = group, buffer = bufnr }) - + --[[ Disable for now the format on save so it does not fuck up other shit vim.api.nvim_create_autocmd('BufWritePre', { buffer = bufnr, group = group, @@ -89,6 +91,7 @@ return { { }) end }) + --]] end -- LspAttach is where you enable features that only work @@ -103,7 +106,7 @@ return { { return end - if client.supports_method('textDocument/formatting') then + if client:supports_method('textDocument/formatting') then buffer_autoformat(event.buf) end @@ -203,5 +206,45 @@ return { { }) vim.lsp.enable('sourcekit') + + -- kotlin-lsp (JetBrains) — not auto-handled by mason-lspconfig + -- The pre-alpha EAP build has an expiry baked in, so we launch it under + -- `faketime` pinned to a date within its valid window. + -- Requires: `brew install libfaketime` (provides the `faketime` binary). + vim.lsp.config('kotlin_lsp', { + capabilities = capabilities, + cmd = { 'faketime', '2026-06-04', 'kotlin-lsp', '--stdio' }, + }) + vim.lsp.enable('kotlin_lsp') + + -- Ruby LSP — uses the GLOBAL `ruby-lsp` gem, NOT a Gemfile entry. When + -- launched in a project it builds its own "composed bundle" under + -- .ruby-lsp/ that layers ruby-lsp on top of the app's gems, so your + -- Gemfile stays untouched (this is what the ruby-lsp maintainers + -- recommend). We inherit lspconfig's default cmd, which runs `ruby-lsp` + -- (resolved from rbenv's PATH) with cwd = root_dir. + -- Install once per Ruby you use, e.g.: gem install ruby-lsp (Ruby >= 3) + vim.lsp.config('ruby_lsp', { + capabilities = capabilities, + }) + vim.lsp.enable('ruby_lsp') + + -- Standalone RuboCop LSP, run from the project's bundle (rubocop is + -- normally already in the Gemfile, so no change needed there). + -- NOTE: ruby-lsp's composed bundle also auto-activates a RuboCop addon + -- when rubocop is present, so running this too can produce duplicate + -- diagnostics. Comment out the two lines below if you'd rather get + -- RuboCop only through ruby-lsp. + vim.lsp.config('rubocop', { + capabilities = capabilities, + cmd = function(dispatchers, config) + return vim.lsp.rpc.start( + { 'bundle', 'exec', 'rubocop', '--lsp' }, + dispatchers, + config and config.root_dir and { cwd = config.cmd_cwd or config.root_dir } + ) + end, + }) + vim.lsp.enable('rubocop') end } } diff --git a/lua/funsi/plugins/nvim-tree.lua b/lua/funsi/plugins/nvim-tree.lua index ce28334..38ab07b 100644 --- a/lua/funsi/plugins/nvim-tree.lua +++ b/lua/funsi/plugins/nvim-tree.lua @@ -26,5 +26,11 @@ return { silent = true, desc = "Toggle File Explorer" }) + + vim.keymap.set("n", "ef", ":NvimTreeFindFile", { + noremap = true, + silent = true, + desc = "Find Current File in Explorer" + }) end }