Skip to content

Commit

Permalink
chore(vim): several updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Feb 17, 2025
1 parent e4e0832 commit 16a456d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
13 changes: 11 additions & 2 deletions home/mlenz/common/programs/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@
exit 1
fi
path="$(realpath "$1")"
cd "$(dirname "$path")"
${lib.getExe config.programs.neovide.package} "$path" "''${@:2}"
shift
if [ -f "$path" ]; then
cd "$(dirname "$path")"
elif [ -d "$path" ]; then
cd "$path"
else
echo "Error: $path does not exist."
exit 1
fi
${lib.getExe config.programs.neovide.package} "$path" "$@"
'';
})
];
Expand Down
26 changes: 13 additions & 13 deletions vim/plugins/blink.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ config, lib, ... }:
{ config, ... }:
{
plugins.blink-cmp = {
enable = true;
settings = {
signature.enabled = true;
completion = {
ghost_text.enabled = false;
documentation = {
Expand All @@ -12,24 +13,23 @@
};
keyword.range = "full";
menu.draw.components.label.width.max = 60;
# https://cmp.saghen.dev/configuration/keymap.html#super-tab
list.selection = {
auto_insert = false;
preselect = lib.nixvim.mkRaw ''
function(ctx)
return not require('blink.cmp').snippet_active({ direction = 1 })
end
'';
preselect = false;
# lib.nixvim.mkRaw ''
# function(ctx)
# return not require('blink.cmp').snippet_active({ direction = 1 })
# end
# '';
};
};
appearance = {
kind_icons = { };
};
# https://cmp.saghen.dev/configuration/keymap#presets
keymap = {
preset = "super-tab";
};
signature = {
enabled = true;
"<CR>" = [
"accept"
"fallback"
];
};
sources = {
default = [
Expand Down

0 comments on commit 16a456d

Please sign in to comment.