Compare commits

..

No commits in common. "0667f0f4c92010d2f48b4bbfddc93b33e9b77a92" and "8ccc90c9f36a3325df5dd2005fd993855a760960" have entirely different histories.

4 changed files with 36 additions and 45 deletions

View file

@ -6,33 +6,33 @@
}: let }: let
inherit (config.vars) neovimIde; inherit (config.vars) neovimIde;
inherit (pkgs) vimPlugins; inherit (pkgs) vimPlugins;
in { in
programs = { lib.mkIf neovimIde {
# I love doing typos programs = {
bash.shellAliases = { # I love doing typos
nivm = "nvim"; bash.shellAliases = {
nivim = "nvim"; nivm = "nvim";
}; nivim = "nvim";
};
neovim = { neovim = {
defaultEditor = true; defaultEditor = true;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
extraLuaConfig = extraLuaConfig =
/* /*
lua lua
*/ */
'' ''
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = 'sh', pattern = 'sh',
command = 'setlocal ts=4 sw=4 sts=0 expandtab', command = 'setlocal ts=4 sw=4 sts=0 expandtab',
}); });
''; '';
plugins = plugins = [
lib.mkIf neovimIde [
]; ];
};
}; };
}; }
}

View file

@ -50,23 +50,13 @@ 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,20 +28,21 @@ 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")
return renderer.window_exists(state); local window_exists = 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