Barna Máté
2d4f34fe82
- fixed neogen keymap - changed qwen2.5-codder to llama3 sinec qwen crashes out - updated flake
134 lines
3 KiB
Nix
134 lines
3 KiB
Nix
{ pkgs, lib, ... }: {
|
|
|
|
imports = [
|
|
./trouble.nix
|
|
./neogen.nix
|
|
];
|
|
|
|
# Autocomplete
|
|
# TODO "ghost text" auto complete with code companion
|
|
plugins.cmp = {
|
|
enable = true;
|
|
settings = {
|
|
autoEnableSources = true;
|
|
experimental = { ghost_text = true; };
|
|
performance = {
|
|
debounce = 60;
|
|
fetchingTimeout = 200;
|
|
maxViewEntries = 30;
|
|
};
|
|
|
|
formatting = { fields = [ "kind" "abbr" "menu" ]; };
|
|
sources = [
|
|
{ name = "nvim_lsp"; }
|
|
{
|
|
name = "buffer"; # text within current buffer
|
|
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
|
keywordLength = 3;
|
|
}
|
|
{
|
|
name = "path"; # file system paths
|
|
keywordLength = 3;
|
|
}
|
|
];
|
|
|
|
window = {
|
|
completion = { border = "solid"; };
|
|
documentation = { border = "solid"; };
|
|
};
|
|
|
|
mapping = {
|
|
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
|
"<C-j>" = "cmp.mapping.select_next_item()";
|
|
"<C-k>" = "cmp.mapping.select_prev_item()";
|
|
"<C-e>" = "cmp.mapping.abort()";
|
|
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
|
"<C-Space>" = "cmp.mapping.complete()";
|
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
|
};
|
|
};
|
|
};
|
|
|
|
plugins.cmp-nvim-lsp = {
|
|
enable = true; # LSP
|
|
};
|
|
plugins.cmp-buffer = {
|
|
enable = true;
|
|
};
|
|
plugins.cmp-path = {
|
|
enable = true; # file system paths
|
|
};
|
|
plugins.cmp_luasnip = {
|
|
enable = true; # snippets
|
|
};
|
|
|
|
# Language server
|
|
plugins.lsp =
|
|
{
|
|
enable = true;
|
|
};
|
|
|
|
plugins.none-ls = {
|
|
enable = true;
|
|
sources = {
|
|
code_actions = {
|
|
statix.enable = true;
|
|
gitsigns.enable = true;
|
|
};
|
|
diagnostics = {
|
|
statix.enable = true;
|
|
deadnix.enable = true;
|
|
pylint.enable = true;
|
|
checkstyle.enable = true;
|
|
};
|
|
formatting = {
|
|
alejandra.enable = true;
|
|
stylua.enable = true;
|
|
shfmt.enable = true;
|
|
nixpkgs_fmt.enable = true;
|
|
google_java_format.enable = false;
|
|
prettier = {
|
|
enable = true;
|
|
disableTsServerFormatter = true;
|
|
};
|
|
};
|
|
completion = {
|
|
luasnip.enable = true;
|
|
spell.enable = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
plugins.nix.enable = true;
|
|
|
|
# Auto formatter
|
|
plugins.conform-nvim = {
|
|
enable = true;
|
|
settings = {
|
|
format_on_save = {
|
|
lspFallback = true;
|
|
timeoutMs = 500;
|
|
};
|
|
formatters_by_ft = {
|
|
# Use the "_" filetype to run formatters on filetypes that don't have other formatters configured.
|
|
"_" = [
|
|
"squeeze_blanks"
|
|
"trim_whitespace"
|
|
"trim_newlines"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
# Auto-tagging
|
|
plugins.ts-autotag = {
|
|
enable = true;
|
|
};
|
|
# Needed for autotagging
|
|
plugins.treesitter = {
|
|
enable = true;
|
|
};
|
|
}
|