config/users/natalie/vim/languages.nix

154 lines
3.2 KiB
Nix
Raw Normal View History

2025-05-20 21:30:54 -07:00
{
flake,
2025-05-21 10:44:59 -07:00
user,
host,
2025-05-20 21:30:54 -07:00
pkgs,
...
2025-05-21 15:25:56 -07:00
}:
{
2025-05-19 21:42:58 -07:00
vim = {
2025-05-20 21:30:54 -07:00
extraPackages = with pkgs; [
python312Packages.pylatexenc
];
2025-05-19 21:42:58 -07:00
languages = {
2025-08-01 19:21:02 -07:00
python = {
format.type = "ruff";
};
2025-05-21 10:44:59 -07:00
markdown = {
2025-05-20 21:30:54 -07:00
enable = true;
2025-05-21 10:44:59 -07:00
extensions.render-markdown-nvim = {
enable = true;
};
2025-05-19 21:42:58 -07:00
};
2025-08-01 20:07:24 -07:00
nix = {
lsp.servers = [
"nil"
"nixd"
];
};
2025-05-19 21:42:58 -07:00
};
2025-05-21 10:44:59 -07:00
2025-05-19 21:42:58 -07:00
formatter.conform-nvim = {
enable = true;
setupOpts = {
formatters_by_ft = {
2025-05-21 15:25:56 -07:00
fish = [ "fish_indent" ];
tex = [ "latexindent" ];
2025-05-19 21:42:58 -07:00
};
};
};
2025-05-21 15:25:56 -07:00
diagnostics = {
2025-05-19 21:42:58 -07:00
enable = true;
2025-05-21 15:25:56 -07:00
config = {
virtual_text = {
format = pkgs.lib.generators.mkLuaInline ''
function(diagnostic)
return string.format("%s (%s)", diagnostic.message, diagnostic.source)
end
'';
};
};
nvim-lint = {
enable = true;
linters_by_ft = {
nix = [ "statix" ];
tex = [ "chktex" ];
haskell = [ "hlint" ];
};
2025-05-27 19:56:17 -07:00
linters = {
chktex = {
ignore_exitcode = true;
};
};
2025-05-19 21:42:58 -07:00
};
};
2025-05-20 21:30:54 -07:00
treesitter = {
enable = true;
fold = true;
addDefaultGrammars = true;
highlight = {
additionalVimRegexHighlighting = true;
};
2025-05-21 10:44:59 -07:00
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
markdown_inline
markdown
];
2025-05-20 21:30:54 -07:00
highlight.enable = true;
2025-05-21 10:44:59 -07:00
indent.enable = false;
2025-05-20 21:30:54 -07:00
};
visuals = {
fidget-nvim = {
setupOpts = {
logger.level = "trace";
};
};
};
2025-05-21 11:55:34 -07:00
ui = {
nvim-ufo = {
enable = true;
};
};
2025-05-20 21:30:54 -07:00
autocomplete.blink-cmp = {
enable = true;
2025-05-21 10:44:59 -07:00
mappings = {
close = null;
complete = null;
confirm = null;
next = null;
previous = null;
scrollDocsDown = null;
scrollDocsUp = null;
};
2025-05-20 21:30:54 -07:00
setupOpts = {
2025-05-21 10:44:59 -07:00
keymap = {
preset = "super-tab";
};
2025-05-20 21:30:54 -07:00
completion = {
ghost_text.enabled = false;
list.selection.preselect = true;
2025-05-21 10:44:59 -07:00
trigger = {
show_in_snippet = true;
};
accept.auto_brackets.enabled = true;
};
signature = {
enabled = true;
2025-05-20 21:30:54 -07:00
};
};
};
2025-06-12 15:14:43 -07:00
lazy.plugins."blink.pairs" = {
enabled = true;
package = pkgs.vimPlugins.blink-pairs;
setupModule = "blink.pairs";
setupOpts = {
mappings = {
# -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime
enabled = true;
# -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10
pairs = [ ];
};
highlights = {
enabled = true;
groups = [
"BlinkPairsOrange"
"BlinkPairsPurple"
"BlinkPairsBlue"
];
matchparen = {
enabled = true;
group = "MatchParen";
};
};
debug = false;
};
};
2025-05-19 21:42:58 -07:00
};
}