Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random things collected from my old vim config #30

Merged
merged 13 commits into from
Jul 5, 2024
24 changes: 15 additions & 9 deletions modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:

{
imports = [
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -98,6 +106,4 @@
{ mode = "v"; key = "<A-k>"; action = ":m '<-2<CR>gv=gv"; }
{ mode = "n"; key = "<leader>gb"; action = ":Gitsign blame_line<CR>"; }
];

colorschemes.kanagawa.enable = true;
}
26 changes: 24 additions & 2 deletions modules/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ in
)
'';
};
gopls = {
enable = true;
settings.gopls = {
staticcheck = true;
};
};
html.enable = true;
java-language-server = {
enable = true;
Expand All @@ -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;
Expand All @@ -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;
};

Expand Down Expand Up @@ -148,6 +164,12 @@ in
};
};
};

schemastore = {
enable = true;
json.enable = true;
yaml.enable = true;
};
};

keymaps = [ {
Expand Down
10 changes: 9 additions & 1 deletion modules/treesitter.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down