diff --git a/modules/default.nix b/modules/default.nix index 20e487b..a423be7 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: { imports = [ @@ -29,24 +29,32 @@ secure = true; }; + extraPlugins = with pkgs.vimPlugins; [ + vim-fetch # accept ./path/to/file:123 as line numbers + ]; + + colorschemes.kanagawa.enable = true; + editorconfig.enable = true; plugins = { - nvim-autopairs.enable = true; # brackets, html, ... - # does not work - #commentary.enable = true; bufferline.enable = true; - lastplace.enable = true; + commentary.enable = true; + crates-nvim.enable = true; gitsigns.enable = true; - nvim-colorizer.enable = true; indent-blankline.enable = true; + lastplace.enable = true; lualine = { enable = true; globalstatus = true; theme = "onedark"; }; + nvim-autopairs.enable = true; # brackets, html, ... + nvim-colorizer.enable = true; + rainbow-delimiters.enable = true; tmux-navigator.enable = true; - crates-nvim.enable = true; + ts-context-commentstring.enable = true; # set comment string dynamically + vim-matchup.enable = true; # extends % key with comments }; userCommands = { @@ -98,6 +106,4 @@ { mode = "v"; key = ""; action = ":m '<-2gv=gv"; } { mode = "n"; key = "gb"; action = ":Gitsign blame_line"; } ]; - - colorschemes.kanagawa.enable = true; } diff --git a/modules/lsp.nix b/modules/lsp.nix index fd6c2a9..7715f0c 100644 --- a/modules/lsp.nix +++ b/modules/lsp.nix @@ -61,6 +61,12 @@ in ) ''; }; + gopls = { + enable = true; + settings.gopls = { + staticcheck = true; + }; + }; html.enable = true; java-language-server = { enable = true; @@ -71,7 +77,14 @@ in #ltex.enable = true; marksman.enable = true; #nixd.enable = true; - nil-ls.enable = true; + nil-ls = { + enable = true; + settings = { + formatting.command = [ "nixpkgs-fmt" ]; + nix.flake.autoArchive = true; + }; + }; + pylsp.enable = true; rust-analyzer = { enable = true; installCargo = false; @@ -83,7 +96,10 @@ in texlab.enable = true; tsserver.enable = true; typos-lsp.enable = true; - yamlls.enable = true; + yamlls = { + enable = true; + settings.yaml.format.printWidth = 180; + }; lemminx.enable = true; }; @@ -148,6 +164,12 @@ in }; }; }; + + schemastore = { + enable = true; + json.enable = true; + yaml.enable = true; + }; }; keymaps = [ { diff --git a/modules/treesitter.nix b/modules/treesitter.nix index 85653db..0a596ed 100644 --- a/modules/treesitter.nix +++ b/modules/treesitter.nix @@ -1,5 +1,13 @@ { - plugins.treesitter.enable = true; + plugins.treesitter = { + enable = true; + ignoreInstall = [ + # remove rather big grammars + "systemverilog" + "verilog" + ]; + indent = true; + }; # Enable automatically closing and renaming HTML tags plugins.ts-autotag.enable = true;