edit nvf config

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>

Former-commit-id: 20350cacd5f393f214438f5b19753af53b56f305
This commit is contained in:
Hadi
2025-06-19 15:29:24 +02:00
parent 5d7c159e34
commit f306041af9
3 changed files with 128 additions and 18 deletions

View File

@@ -1,28 +1,84 @@
{
{lib, ...}: {
programs.nvf.settings.vim = {
diagnostics = {
enable = true;
nvim-lint.enable = true;
config.virtual_text = true;
config = {
signs = {
text = {
"vim.diagnostic.severity.Error" = " ";
"vim.diagnostic.severity.Warn" = " ";
"vim.diagnostic.severity.Hint" = " ";
"vim.diagnostic.severity.Info" = " ";
};
};
underline = true;
update_in_insert = true;
virtual_text = {
format =
lib.generators.mkLuaInline
/*
lua
*/
''
function(diagnostic)
return string.format("%s", diagnostic.message)
--return string.format("%s (%s)", diagnostic.message, diagnostic.source)
end
'';
};
};
nvim-lint = {
enable = true;
linters = {
};
linters_by_ft = {
c = [
"cppcheck"
];
};
};
};
syntaxHighlighting = true;
treesitter = {
enable = true;
autotagHtml = true;
context.enable = true;
highlight = {
enable = true;
additionalVimRegexHighlighting = true;
};
highlight.enable = true;
};
lsp = {
enable = true;
trouble.enable = true;
lspSignature.enable = true;
lspconfig.enable = true;
formatOnSave = true;
inlayHints.enable = true;
lightbulb.enable = true;
null-ls.enable = true;
otter-nvim.enable = true;
otter-nvim = {
enable = true;
setupOpts = {
buffers.set_filetype = true;
lsp = {
diagnostic_update_event = [
"BufWritePost"
"InsertLeave"
];
};
};
};
lspkind.enable = true;
lspsaga = {
enable = true;
setupOpts = {
ui = {
code_action = "🟅";
};
lightbulb = {
sign = false;
virtual_text = true;
};
breadcrumbs.enable = false;
};
};
};
languages = {
enableDAP = true;
@@ -32,9 +88,19 @@
astro.enable = true;
go.enable = true;
markdown.enable = true;
ts.enable = true;
ts.extensions.ts-error-translator.enable = true;
markdown = {
enable = true;
extensions = {
render-markdown-nvim = {
enable = true;
};
};
extraDiagnostics.enable = true;
};
ts = {
enable = true;
extensions.ts-error-translator.enable = true;
};
css.enable = true;
svelte.enable = true;
html.enable = true;
@@ -42,5 +108,10 @@
nix.enable = true;
tailwind.enable = true;
};
formatter = {
conform-nvim = {
enable = true;
};
};
};
}

View File

@@ -1,4 +1,4 @@
{
{lib, ...}: {
programs.nvf.settings.vim = {
viAlias = false;
vimAlias = true;
@@ -6,16 +6,39 @@
# syntaxHighlighting = true;
options = {
autoindent = true;
smartindent = true;
shiftwidth = 2;
foldlevel = 99;
foldcolumn = "auto:1";
mousescroll = "ver:1,hor:1";
mousemoveevent = true;
fillchars = "eob:,fold: ,foldopen:,foldsep:,foldclose:";
signcolumn = "yes";
tabstop = 2;
softtabstop = 2;
wrap = false;
};
globals = {
navic_silence = true; # navic tries to attach multiple LSPs and fails
suda_smart_edit = 1; # use super user write automatically
neovide_scale_factor = 0.7;
neovide_cursor_animation_length = 0.1;
neovide_cursor_short_animation_length = 0;
};
clipboard = {
enable = true;
registers = "unnamedplus";
providers.wl-copy.enable = true;
};
spellcheck = {
enable = true;
programmingWordlist.enable = true;
};
theme = {
enable = true;
name = lib.mkForce "catppuccin";
style = "mocha";
transparent = lib.mkForce true;
};
};
}

View File

@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
programs.nvf.settings.vim = {
utility = {
motion.flash-nvim.enable = true;
@@ -11,10 +11,21 @@
cmp.enable = true;
};
statusline.lualine.enable = true;
autocomplete.blink-cmp = {
enable = true;
friendly-snippets.enable = true;
autocomplete = {
nvim-cmp = {
enable = true;
sources = {
buffer = "[Buffer]";
nvim-cmp = null;
path = "[Path]";
};
sourcePlugins = [
pkgs.vimPlugins.cmp-cmdline
];
};
};
snippets.luasnip.enable = true;
ui = {
noice.enable = true;
@@ -31,6 +42,11 @@
mappings.open = "<leader>gl";
};
};
formatter.conform-nvim.enable = true;
visuals = {
rainbow-delimiters.enable = true;
nvim-scrollbar = {
enable = false;
};
};
};
}