Skip to content

Commit 665b4ac

Browse files
committed
Various fixes
1 parent 09d2023 commit 665b4ac

File tree

3 files changed

+70
-44
lines changed

3 files changed

+70
-44
lines changed

home/fish-functions/todo.fish

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
set -f line (rg ' (TODO|XXX): ')
2+
3+
for i in $line
4+
set -l file (echo $i | cut -d: -f1)
5+
set -l type (echo $i | cut -d: -f2)
6+
set -l text (echo $i | cut -d: -f3-)
7+
8+
if test $type = "TODO"
9+
set_color yellow
10+
else if test $type = "XXX"
11+
set_color red
12+
else
13+
set_color cyan
14+
end
15+
16+
# echo -n "$text"
17+
# set_color normal
18+
# echo -e "\t\t$file"
19+
string pad "$text" "$file"
20+
end

home/fish.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@
5959
description = "Rebuild the system";
6060
wraps = "nixos-rebuild switch";
6161
};
62+
todo = {
63+
body = builtins.readFile ./fish-functions/todo.fish;
64+
description = "Find local todos";
65+
};
6266
use = {
6367
body = builtins.readFile ./fish-functions/use.fish;
6468
description = "Use a nix shell";

home/neovim.nix

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ config, pkgs, ... }: {
1+
{ pkgs, ... }: {
22
# Issues:
33
# - Run python script with args/env (nvim-iron?)
44
# - Set up nvim-dap
@@ -48,14 +48,9 @@
4848
comment = {
4949
enable = true;
5050
settings = {
51-
toggler = {
52-
line = "<C-/>";
53-
# block = "<C-/>"; # TODO: Fix this
54-
};
55-
mappings = {
56-
basic = false;
57-
extra = false;
58-
};
51+
mappings.extra = false;
52+
opleader.line = "<C-/>"; # Ctrl-/
53+
toggler.line = "<C-/>"; # Ctrl-/
5954
};
6055
};
6156
multicursors.enable = true;
@@ -74,33 +69,14 @@
7469
# };
7570
# rustaceanvim.enable = true;
7671
# https://github.com/MikaelFangel/nixvim-config/blob/main/config/cmp.nix
77-
cmp = {
72+
blink-cmp = {
7873
enable = true;
7974
settings = {
80-
# experimental.ghost_text = true;
81-
mapping = {
82-
"<C-Space>" = "cmp.mapping.complete()";
83-
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
84-
"<C-e>" = "cmp.mapping.close()";
85-
"<C-f>" = "cmp.mapping.scroll_docs(4)";
86-
"<CR>" = "cmp.mapping.confirm({ select = true })";
87-
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
88-
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
89-
};
9075
completion = {
91-
completeopt = "menu,menuone,noinsert,noselect";
76+
documentation.auto_show = true;
77+
ghost_text.enabled = true;
9278
};
93-
sources = [
94-
{ name = "nvim_lsp"; }
95-
{ name = "treesitter"; }
96-
{
97-
name = "buffer";
98-
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
99-
}
100-
{ name = "nvim_lua"; }
101-
{ name = "path"; }
102-
# { name = "copilot"; }
103-
];
79+
signature.enabled = true;
10480
};
10581
};
10682

@@ -119,8 +95,9 @@
11995
ruff.enable = true;
12096
rust_analyzer = {
12197
enable = true;
122-
installCargo = false;
123-
installRustc = false;
98+
installCargo = true;
99+
installRustc = true;
100+
installRustfmt = true;
124101
};
125102
ts_ls.enable = true;
126103
};
@@ -130,16 +107,19 @@
130107
enable = true;
131108
keymaps = {
132109
"<A-f>" = "find_files";
133-
"<C-F>" = "live_grep";
134-
"<A-r>" = "commands";
110+
"<A-j>" = "lsp_document_symbols";
111+
"<A-r>" = "command_history";
135112
"<A-z>" = "zoxide list";
136113
"<A-Tab>" = "buffers";
114+
"<C-F>" = "live_grep";
115+
"<C-Z>" = "undo";
137116
};
138117

139118
extensions = {
140119
fzf-native.enable = true;
141120
zoxide.enable = true;
142121
ui-select.enable = true;
122+
undo.enable = true;
143123
};
144124
};
145125

@@ -179,12 +159,34 @@
179159
};
180160
};
181161

162+
noice = {
163+
enable = true;
164+
settings = {
165+
lsp = {
166+
progress = {
167+
enabled = true;
168+
throttle = 100;
169+
};
170+
override = {
171+
"vim.lsp.util.convert_input_to_markdown_lines" = true;
172+
"vim.lsp.util.stylize_markdown" = true;
173+
};
174+
};
175+
presets = {
176+
bottom_search = true;
177+
command_palette = true;
178+
long_message_to_split = true;
179+
inc_rename = true;
180+
};
181+
};
182+
};
183+
182184
web-devicons.enable = true; # Telescope dep
183185
};
184186

185187
keymaps = [
186-
{ key = "<C-Up>"; action = "<CMD>move +1<CR>"; }
187-
{ key = "<C-Down>"; action = "<CMD>move -1<CR>"; }
188+
{ key = "<C-Up>"; action = "<CMD>move -2<CR>"; }
189+
{ key = "<C-Down>"; action = "<CMD>move +1<CR>"; }
188190
];
189191

190192
extraPlugins = with pkgs.vimPlugins; [ vim-airline-themes ];
@@ -199,12 +201,12 @@
199201
withPython3 = true;
200202

201203
performance = {
202-
byteCompileLua = {
203-
enable = true;
204-
nvimRuntime = true;
205-
luaLib = true;
206-
plugins = true;
207-
};
204+
# byteCompileLua = {
205+
# enable = true;
206+
# nvimRuntime = true;
207+
# luaLib = true;
208+
# plugins = true;
209+
# };
208210
};
209211
};
210212

0 commit comments

Comments
 (0)