This commit is contained in:
Jana Dönszelmann 2025-05-28 11:27:06 +02:00
parent f289c537d8
commit ddb92ea0c5
No known key found for this signature in database
12 changed files with 918 additions and 643 deletions

View file

@ -9,26 +9,16 @@ let
hash = "sha256-mddnBvIrekHh60Ix6qIYAnv10Mu40LamGI47EXk9wSo=";
};
};
# for lsp/cmp inside markdown code blocks
otter = pkgs.vimUtils.buildVimPlugin {
name = "otter";
src = pkgs.fetchFromGitHub {
owner = "jmbuhr";
repo = "otter.nvim";
rev = "cbb1be0586eae18cbea38ada46af428d2bebf81a";
hash = "sha256-eya/8rG3O8UFeeBRDa5U8v3qay+q3iFwPnYtdX7ptCA=";
};
};
fzy-lua-native = pkgs.vimUtils.buildVimPlugin {
name = "fzy-lua-native";
src = pkgs.fetchFromGitHub {
owner = "romgrk";
repo = "fzy-lua-native";
rev = "9d720745d5c2fb563c0d86c17d77612a3519c506";
hash = "sha256-pBV5iGa1+5gtM9BcDk8I5SKoQ9sydOJHsmyoBcxAct0=";
};
};
in
# fzy-lua-native = pkgs.vimUtils.buildVimPlugin {
# name = "fzy-lua-native";
# src = pkgs.fetchFromGitHub {
# owner = "romgrk";
# repo = "fzy-lua-native";
# rev = "9d720745d5c2fb563c0d86c17d77612a3519c506";
# hash = "sha256-pBV5iGa1+5gtM9BcDk8I5SKoQ9sydOJHsmyoBcxAct0=";
# };
# };
{
programs.nixvim = {
plugins = {
@ -130,6 +120,16 @@ in
};
};
treesitter-context = {
enable = true;
settings = {
multiwindow = true;
separator = "";
max_lines = 4;
trim_scopes = "outer";
};
};
treesitter = {
enable = true;
@ -142,6 +142,7 @@ in
ensure_installed = "all";
ignore_install = [
"wing"
"brightscript"
];
highlight.enable = true;
@ -149,32 +150,114 @@ in
incremental_selection = {
enable = true;
keymaps = {
# init_selection = "<CR>";
scope_incremental = "ss";
node_incremental = "si";
node_decremental = "sd";
scope_incremental = "s";
node_incremental = "+";
node_decremental = "-";
};
};
};
};
rainbow-delimiters.enable = true;
vim-surround.enable = true;
cmp-nvim-lsp.enable = true;
lsp-format.enable = true;
fugitive.enable = false;
fugitive.enable = true;
lspkind.enable = true;
crates.enable = true;
fidget.enable = true;
cmp.enable = true;
nvim-autopairs.enable = true;
# nvim-highlight-colors.enable = true;
cmp = {
enable = true;
autoEnableSources = true;
settings = {
completion.completeopt = "noselect";
preselect = "None";
sources =
let
s = name: { inherit name; };
in
[
{
name = "nvim_lsp";
priority = 8;
}
# (s "nvim_lsp_signature_help")
# (s "treesitter")
(s "path")
(s "luasnip")
# (s "crates")
# (s "git")
# (s "calc")
# (s "buffer")
];
mapping =
let
next = ''
function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end
'';
prev = ''
function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end
'';
in
{
"<C-Space>" = "cmp.mapping.complete()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-d>" = ''
function()
if cmp.visible_docs() then
cmp.close_docs()
else
cmp.open_docs()
end
end
'';
"<Tab>" = next;
"<S-Tab>" = prev;
"<Down>" = next;
"<Up>" = prev;
};
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
sorting.comparators = [
"offset"
"exact"
"score"
"recently_used"
"locality"
"kind"
"length"
"order"
];
window =
let
common_border = {
border = "rounded";
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None";
};
in
{
completion = common_border;
documentation = common_border;
};
};
};
image = {
enable = true;
integrations.markdown = {
enabled = true;
clearInInsertMode = true;
downloadRemoteImages = true;
};
};
# dial.nvim
@ -294,6 +377,7 @@ in
codeAction.keys = {
quit = "<Esc>";
};
symbolInWinbar.enable = false;
};
typst-vim = {
@ -312,9 +396,9 @@ in
rustaceanvim = {
enable = true;
rustAnalyzerPackage = pkgs.rust-analyzer;
settings = {
rustAnalyzerPackage = null;
auto_attach = true;
server = {
standalone = false;
@ -331,7 +415,7 @@ in
# check = {
# command = "+nightly clippy";
# };
cachePriming.enable = false;
cachePriming.enable = true;
diagnostic = {
refreshSupport = true;
@ -468,6 +552,10 @@ in
};
};
# leap = {
# enable = true;
# };
wilder = {
enable = true;
modes = [
@ -520,7 +608,7 @@ in
(function()
local highlighters = {
wilder.pcre2_highlighter(),
wilder.lua_fzy_highlighter(),
-- wilder.lua_fzy_highlighter(),
}
local popupmenu_renderer = wilder.popupmenu_renderer(
@ -576,10 +664,21 @@ in
telescope = {
enable = true;
extensions.ui-select.enable = true;
extensions.fzf-native.enable = true;
extensions = {
ui-select.enable = true;
fzf-native.enable = true;
frecency.enable = true;
};
settings = {
file_ignore_patterns = [
"^.git/"
"^.jj/"
"^.vscode/"
"^.idea/"
"^build/"
"^target/"
];
defaults = {
path_display = [ "smart" ];
layout_strategy = "horizontal";
@ -591,6 +690,11 @@ in
};
};
# diagnostics
trouble = {
enable = true;
};
# tabs
barbar = {
enable = true;
@ -600,6 +704,11 @@ in
};
};
# for lsp/cmp inside markdown code blocks
otter = {
enable = true;
};
none-ls = {
enable = true;
sources = {
@ -616,32 +725,27 @@ in
web-devicons.enable = true;
};
extraPlugins = with pkgs.vimPlugins; [
vim-vsnip
cmp-vsnip
cmp-path
cmp-spell
telescope-ui-select-nvim
telescope-fzf-native-nvim
vim-suda
render-markdown
otter
vim-astro
nvim-web-devicons
vim-visual-multi
vim-gh-line
BufOnly-vim
neoconf-nvim
vim-autoswap
targets-vim
fzy-lua-native
# fzy-lua-native
cpsm
# jj
vim-jjdescription
hover-nvim
];
};