feat(nvim): setup lsp_lines

This commit is contained in:
matt1432 2024-05-09 09:12:01 -04:00
parent 8ccc90c9f3
commit 9c9945523c
3 changed files with 20 additions and 11 deletions

View file

@ -50,13 +50,23 @@ in {
lsp_status.on_attach(client); lsp_status.on_attach(client);
end, end,
}); });
-- Disable virtual_text since it's redundant due to lsp_lines.
vim.diagnostic.config({
virtual_text = false,
});
require('lsp_lines').setup();
''; '';
plugins = [ plugins = [
vimPlugins.nvim-lspconfig vimPlugins.nvim-lspconfig
vimPlugins.coq_nvim vimPlugins.coq_nvim
vimPlugins.coq-artifacts vimPlugins.coq-artifacts
vimPlugins.coq-thirdparty vimPlugins.coq-thirdparty
vimPlugins.lsp-status-nvim vimPlugins.lsp-status-nvim
vimPlugins.lsp_lines-nvim
]; ];
}; };
}; };

View file

@ -55,7 +55,7 @@ in
lua lua
*/ */
'' ''
local lsp = require('lspconfig') local lsp = require('lspconfig');
lsp.nixd.setup({}); lsp.nixd.setup({});
lsp.nixd.setup(require('coq').lsp_ensure_capabilities({})); lsp.nixd.setup(require('coq').lsp_ensure_capabilities({}));

View file

@ -1,6 +1,6 @@
-- Override netrw -- Override netrw
vim.g.loaded_netrw = 0 vim.g.loaded_netrw = 0;
vim.g.loaded_netrwPlugin = 0 vim.g.loaded_netrwPlugin = 0;
require('neo-tree').setup({ require('neo-tree').setup({
close_if_last_window = true, close_if_last_window = true,
@ -28,21 +28,20 @@ require('neo-tree').setup({
source_selector = { source_selector = {
winbar = true, winbar = true,
statusline = false statusline = false,
}, },
follow_current_file = { follow_current_file = {
enabled = true, enabled = true,
leave_dirs_open = true, leave_dirs_open = true,
} },
}) });
local function is_neotree_open() local function is_neotree_open()
local manager = require("neo-tree.sources.manager") local manager = require("neo-tree.sources.manager");
local renderer = require("neo-tree.ui.renderer") local renderer = require("neo-tree.ui.renderer");
local state = manager.get_state("filesystem") local state = manager.get_state("filesystem");
local window_exists = renderer.window_exists(state) return renderer.window_exists(state);
return window_exists
end end
-- Auto open Neo-Tree on big enough window -- Auto open Neo-Tree on big enough window