nixvim ricing

This commit is contained in:
xqtc 2024-09-18 20:43:39 +02:00
parent 56f631e606
commit fe9a05dd7f
3 changed files with 64 additions and 1 deletions

View file

@ -10,6 +10,15 @@ vim.keymap.set('t', '<Esc>', '<C-\\><C-n>')
-- move selection linewise -- move selection linewise
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv") vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv") vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
require("aerial").setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
-- vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
-- vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end,
})
-- You probably also want to set a keymap to toggle aerial
--nmap('K', vim.lsp.buf.hover, 'Hover Documentation') --nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
--nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation') --nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')

View file

@ -9,7 +9,7 @@
./nixvim.nix ./nixvim.nix
./shell.nix ./shell.nix
./firefox.nix ./firefox.nix
./dwl.nix # ./dwl.nix
./wm.nix ./wm.nix
./gtk.nix ./gtk.nix
./foot.nix ./foot.nix

View file

@ -14,6 +14,9 @@
colorcolumn = "80"; colorcolumn = "80";
}; };
# extraPlugins = with pkgs.vimPlugins; [headlines-nvim]; # extraPlugins = with pkgs.vimPlugins; [headlines-nvim];
extraPlugins = with pkgs.vimPlugins; [
aerial-nvim
];
clipboard.providers.wl-copy.enable = true; clipboard.providers.wl-copy.enable = true;
@ -26,6 +29,14 @@
colorschemes.catppuccin.enable = true; colorschemes.catppuccin.enable = true;
plugins = { plugins = {
navic = {
enable = true;
settings = {
lsp = {
auto_attach = true;
};
};
};
trouble = { trouble = {
enable = true; enable = true;
}; };
@ -47,6 +58,49 @@
left = ""; left = "";
right = ""; right = "";
}; };
settings = {
sections = {
lualine_y = [
{
__unkeyed-1 = "aerial";
colored = true;
cond = {
__raw = ''
function()
local buf_size_limit = 1024 * 1024
if vim.api.nvim_buf_get_offset(0, vim.api.nvim_buf_line_count(0)) > buf_size_limit then
return false
end
return true
end
'';
};
dense = false;
dense_sep = ".";
depth = {
__raw = "nil";
};
sep = " ";
}
];
};
winbar = {
lualine_c = [
{
__unkeyed-1 = "navic";
}
];
# lualine_x = [
# {
# __unkeyed-1 = "filename";
# newfile_status = true;
# path = 3;
# shorting_target = 150;
# }
# ];
};
};
}; };
lsp-format = {enable = true;}; lsp-format = {enable = true;};
copilot-lua = { copilot-lua = {