mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
neovim improvements
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
shellIntegration.enableFishIntegration = true;
|
shellIntegration.enableFishIntegration = true;
|
||||||
font = {
|
font = {
|
||||||
package = pkgs.fira-code;
|
package = pkgs.jetbrains-mono;
|
||||||
name = "FiraCode";
|
name = "JetBrains Mono";
|
||||||
size = 12;
|
size = 11;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
|
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
|
||||||
|
|||||||
@@ -6,4 +6,12 @@
|
|||||||
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
|
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
|
extraConfig = {
|
||||||
|
pull.rebase = true;
|
||||||
|
merge = {
|
||||||
|
tool = "nvimdiff";
|
||||||
|
conflictstyle = "diff3";
|
||||||
|
};
|
||||||
|
mergetool.prompt = false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,9 @@ in {
|
|||||||
catppuccin_debug = true;
|
catppuccin_debug = true;
|
||||||
|
|
||||||
mapleader = ";";
|
mapleader = ";";
|
||||||
|
|
||||||
|
mergetool_layout = "mr";
|
||||||
|
mergetool_prefer_revision = "local";
|
||||||
};
|
};
|
||||||
|
|
||||||
clipboard = {
|
clipboard = {
|
||||||
@@ -132,10 +135,28 @@ in {
|
|||||||
|
|
||||||
extraConfigVim = ''
|
extraConfigVim = ''
|
||||||
hi Normal guibg=NONE ctermbg=NONE
|
hi Normal guibg=NONE ctermbg=NONE
|
||||||
|
set noshowmode
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require("darkman").setup()
|
require("darkman").setup()
|
||||||
|
require("cmp-npm").setup({})
|
||||||
|
require("codewindow").setup({
|
||||||
|
auto_enable = true,
|
||||||
|
window_border = "none",
|
||||||
|
minimap_width = 10,
|
||||||
|
})
|
||||||
|
|
||||||
|
local signs = {
|
||||||
|
{ name = "DiagnosticSignError", text = "" },
|
||||||
|
{ name = "DiagnosticSignWarn", text = "" },
|
||||||
|
{ name = "DiagnosticSignHint", text = "" },
|
||||||
|
{ name = "DiagnosticSignInfo", text = "" },
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, sign in ipairs(signs) do
|
||||||
|
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||||
|
end
|
||||||
|
|
||||||
local Terminal = require('toggleterm.terminal').Terminal
|
local Terminal = require('toggleterm.terminal').Terminal
|
||||||
local lazygit = Terminal:new({
|
local lazygit = Terminal:new({
|
||||||
@@ -167,11 +188,85 @@ in {
|
|||||||
dark = "frappe";
|
dark = "frappe";
|
||||||
light = "latte";
|
light = "latte";
|
||||||
};
|
};
|
||||||
|
integrations.native_lsp.underlines = {
|
||||||
|
errors = ["undercurl"];
|
||||||
|
warnings = ["undercurl"];
|
||||||
|
};
|
||||||
|
customHighlights =
|
||||||
|
/*
|
||||||
|
lua
|
||||||
|
*/
|
||||||
|
''
|
||||||
|
function(colors)
|
||||||
|
return {
|
||||||
|
CmpItemKindCopilot = {fg = colors.teal},
|
||||||
|
CmpItemKindNpm = {fg = colors.maroon},
|
||||||
|
|
||||||
|
-- IntelliJ Theme
|
||||||
|
Constant = {fg = colors.mauve},
|
||||||
|
Character = {link = "Keyword"},
|
||||||
|
Number = {fg = colors.sapphire},
|
||||||
|
Boolean = {link = "Keyword"},
|
||||||
|
Identifier = {fg = colors.text},
|
||||||
|
Function = {fg = colors.blue},
|
||||||
|
Statement = {fg = colors.text},
|
||||||
|
Conditional = {link = "Keyword"},
|
||||||
|
Repeat = {link = "Keyword"},
|
||||||
|
Label = {link = "Keyword"},
|
||||||
|
Operator = {fg = colors.text},
|
||||||
|
Keyword = {fg = colors.peach},
|
||||||
|
Exception = {link = "Keyword"},
|
||||||
|
Include = {link = "Keyword"},
|
||||||
|
Structure = {fg = colors.yellow},
|
||||||
|
Type = {fg = colors.teal},
|
||||||
|
|
||||||
|
SpellBad = {sp = colors.green, style = {"underdotted"}},
|
||||||
|
SpellCap = {sp = colors.green, style = {"underdotted"}},
|
||||||
|
SpellLocal = {sp = colors.green, style = {"underdotted"}},
|
||||||
|
SpellRare = {sp = colors.green, style = {"underdotted"}},
|
||||||
|
|
||||||
|
["@constructor"] = {link = "Keyword"},
|
||||||
|
["@constructor.typescript"] = {link = "@constructor"},
|
||||||
|
["@parameter"] = {link = "Identifier"},
|
||||||
|
|
||||||
|
["@tag"] = {link = "Structure"},
|
||||||
|
["@tag.delimiter"] = {link = "Structure"},
|
||||||
|
["@tag.attribute"] = {fg = colors.mauve, style = {"italic"}}, -- Constant
|
||||||
|
|
||||||
|
["@keyword.function"] = {link = "Keyword"},
|
||||||
|
["@keyword.operator"] = {link = "Keyword"},
|
||||||
|
["@keyword.return"] = {link = "Keyword"},
|
||||||
|
["@keyword.export"] = {link = "Keyword"},
|
||||||
|
|
||||||
|
["@punctuation.special"] = {link = "Operator"},
|
||||||
|
["@conditional.ternary"] = {link = "Operator"},
|
||||||
|
|
||||||
|
["@type.builtin"] = {link = "Keyword"},
|
||||||
|
["@variable.builtin"] = {link = "Keyword"},
|
||||||
|
["@lsp.typemod.class.defaultLibrary"] = {fg = colors.yellow, style = {"bold"}}, -- Structure
|
||||||
|
["@lsp.typemod.variable.defaultLibrary"] = {fg = colors.mauve, style = {"bold"}}, -- Constant
|
||||||
|
["@lsp.typemod.function.defaultLibrary"] = {fg = colors.blue, style = {"bold"}}, -- Function
|
||||||
|
|
||||||
|
["@variable"] = {link = "Constant"},
|
||||||
|
["@field"] = {link = "Constant"},
|
||||||
|
["@property"] = {link = "Constant"},
|
||||||
|
["@property.typescript"] = {link = "@property"},
|
||||||
|
["@lsp.type.property"] = {link = "Constant"},
|
||||||
|
["@lsp.type.interface"] = {link = "Structure"},
|
||||||
|
["@lsp.type.namespace"] = {link = "Structure"},
|
||||||
|
["@attribute.typescript"] = {link = "Structure"},
|
||||||
|
|
||||||
|
["@lsp.mod.local"] = {fg = colors.text},
|
||||||
|
["@lsp.mod.readonly"] = {style = {"italic"}},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
lualine = {
|
lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
theme = "catppuccin";
|
||||||
globalstatus = true;
|
globalstatus = true;
|
||||||
sectionSeparators = {
|
sectionSeparators = {
|
||||||
left = "";
|
left = "";
|
||||||
@@ -192,6 +287,16 @@ in {
|
|||||||
icon = "";
|
icon = "";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
lualine_x = [
|
||||||
|
{
|
||||||
|
name = "filetype";
|
||||||
|
extraConfig = {icon_only = true;};
|
||||||
|
padding = {
|
||||||
|
left = 1;
|
||||||
|
right = 2;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
lualine_z = [
|
lualine_z = [
|
||||||
{
|
{
|
||||||
name = "location";
|
name = "location";
|
||||||
@@ -210,11 +315,11 @@ in {
|
|||||||
indent-blankline = {
|
indent-blankline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
indent.char = "▏";
|
indent.char = "▏";
|
||||||
|
scope.showStart = false;
|
||||||
};
|
};
|
||||||
illuminate.enable = true;
|
illuminate.enable = true;
|
||||||
nvim-autopairs.enable = true;
|
nvim-autopairs.enable = true;
|
||||||
nvim-colorizer.enable = true;
|
nvim-colorizer.enable = true;
|
||||||
copilot-vim.enable = true;
|
|
||||||
neo-tree = {
|
neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
filesystem.filteredItems.visible = true;
|
filesystem.filteredItems.visible = true;
|
||||||
@@ -258,35 +363,39 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
sources = {
|
sources = {
|
||||||
code_actions = {
|
code_actions = {
|
||||||
eslint.enable = true;
|
eslint_d.enable = true;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
};
|
};
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
eslint.enable = true;
|
eslint_d.enable = true;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
};
|
};
|
||||||
formatting = {
|
formatting = {
|
||||||
alejandra.enable = true;
|
alejandra.enable = true;
|
||||||
prettier.enable = true;
|
prettier_d_slim.enable = true;
|
||||||
rustfmt.enable = true;
|
rustfmt.enable = true;
|
||||||
shfmt.enable = true;
|
shfmt.enable = true;
|
||||||
stylua.enable = true;
|
stylua.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
onAttach = ''
|
onAttach =
|
||||||
function(client, bufnr)
|
/*
|
||||||
if client.supports_method("textDocument/formatting") then
|
lua
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
*/
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
''
|
||||||
group = augroup,
|
function(client, bufnr)
|
||||||
buffer = bufnr,
|
if client.supports_method("textDocument/formatting") then
|
||||||
callback = function()
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
vim.lsp.buf.format({async = false})
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
end,
|
group = augroup,
|
||||||
})
|
buffer = bufnr,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format({async = false})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
'';
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -330,10 +439,17 @@ in {
|
|||||||
mode = "symbol";
|
mode = "symbol";
|
||||||
cmp.after = ''
|
cmp.after = ''
|
||||||
function(entry, vim_item, kind)
|
function(entry, vim_item, kind)
|
||||||
kind.kind = kind.kind .. " ";
|
if entry.source.name == "npm" then
|
||||||
|
kind.kind = ""
|
||||||
|
kind.kind_hl_group = "CmpItemKindNpm"
|
||||||
|
end
|
||||||
|
kind.kind = kind.kind .. " "
|
||||||
return kind
|
return kind
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
symbolMap = {
|
||||||
|
Copilot = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nvim-cmp = {
|
nvim-cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -344,13 +460,27 @@ in {
|
|||||||
"<C-Enter>" = "cmp.mapping.complete()";
|
"<C-Enter>" = "cmp.mapping.complete()";
|
||||||
};
|
};
|
||||||
sources = [
|
sources = [
|
||||||
|
{name = "copilot";}
|
||||||
{name = "path";}
|
{name = "path";}
|
||||||
|
{
|
||||||
|
name = "npm";
|
||||||
|
keywordLength = 4;
|
||||||
|
priority = 10;
|
||||||
|
}
|
||||||
{name = "nvim_lsp";}
|
{name = "nvim_lsp";}
|
||||||
{name = "npm";}
|
{name = "nvim_lsp_signature_help";}
|
||||||
{name = "treesitter";}
|
{name = "nvim_lsp_document_symbol";}
|
||||||
];
|
];
|
||||||
formatting.fields = ["kind" "abbr" "menu"];
|
formatting.fields = ["kind" "abbr" "menu"];
|
||||||
window.completion.border = "rounded";
|
window = {
|
||||||
|
completion.border = "rounded";
|
||||||
|
documentation.border = "rounded";
|
||||||
|
};
|
||||||
|
experimental.ghost_text = true;
|
||||||
|
};
|
||||||
|
copilot-lua = {
|
||||||
|
panel.enabled = false;
|
||||||
|
suggestion.enabled = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
@@ -359,6 +489,8 @@ in {
|
|||||||
extraPackages = [angular-ls pkgs.nodePackages.typescript-language-server];
|
extraPackages = [angular-ls pkgs.nodePackages.typescript-language-server];
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
vim-startuptime
|
vim-startuptime
|
||||||
|
vim-mergetool
|
||||||
|
codewindow-nvim
|
||||||
darkman
|
darkman
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user