feat: update system

This commit is contained in:
2025-02-01 11:55:20 +01:00
parent 998a7b9166
commit 84004b6391
29 changed files with 430 additions and 203 deletions

View File

@@ -41,8 +41,14 @@ in
snippet.expand = # lua
"function(args) require('luasnip').lsp_expand(args.body) end";
window = {
completion.border = "rounded";
documentation.border = "rounded";
completion = {
border = "solid";
zindex = 10;
};
documentation = {
border = "solid";
zindex = 10;
};
};
};
};

View File

@@ -15,6 +15,7 @@ in
config = lib.mkIf cfg.enable {
extraConfigLuaPre = # lua
''
vim.lsp.set_log_level("off")
require("actions-preview").setup({})
local signs = {
@@ -28,15 +29,19 @@ in
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
update_in_insert = true,
severity_sort = false,
})
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "solid" })
'';
diagnostics = {
signs.text = {
"__rawKey__vim.diagnostic.severity.ERROR" = "";
"__rawKey__vim.diagnostic.severity.WARN" = "";
"__rawKey__vim.diagnostic.severity.INFO" = "";
"__rawKey__vim.diagnostic.severity.HINT" = "󰌵";
};
underline = true;
update_in_insert = true;
severity_sort = true;
};
keymaps = [
{
key = "<leader>sa";
@@ -70,9 +75,19 @@ in
action.__raw = # lua
"vim.lsp.buf.hover";
}
{
key = "<leader>sh";
mode = "n";
options.silent = true;
action.__raw = # lua
"function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}), {0}) end";
}
];
plugins = {
lsp.enable = true;
lsp = {
enable = true;
inlayHints = false;
};
telescope = {
enable = true;
keymaps = {
@@ -81,7 +96,6 @@ in
"<leader>si" = "lsp_implementations";
"<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions";
"<leader>sh" = "diagnostics";
};
};
inc-rename.enable = true;
@@ -133,8 +147,8 @@ in
}
{
__unkeyed-1 = "<leader>sh";
icon = "󱖫";
desc = "Diagnostics";
icon = "󰞂";
desc = "Inlay Hints";
}
{
__unkeyed-1 = "<leader>sa";

View File

@@ -0,0 +1,23 @@
{
lib,
config,
hmConfig,
...
}:
let
cfg = config.presets.base.spellcheck;
in
{
options.presets.base.spellcheck = {
enable = lib.mkEnableOption "Spellcheck";
};
config = lib.mkIf cfg.enable {
plugins.lsp.servers.harper_ls = {
enable = true;
settings = {
userDictPath = "${hmConfig.xdg.configHome}/harper-user-dictionary.txt";
};
};
};
}

View File

@@ -32,8 +32,8 @@ in
options = {
globalstatus = true;
section_separators = {
left = ""; # "";
right = ""; # "";
left = "";
right = "";
};
component_separators = {
left = "";
@@ -45,8 +45,8 @@ in
{
__unkeyed-1 = "mode";
separator = {
right = ""; # "";
left = ""; # "";
right = "";
left = "";
};
icon = "";
}
@@ -56,8 +56,8 @@ in
{
__unkeyed-1 = "location";
separator = {
right = ""; # "";
left = ""; # "";
right = "";
left = "";
};
}
];

View File

@@ -28,7 +28,7 @@ in
filteredItems.visible = true;
};
extraSources = [ "document_symbols" ];
popupBorderStyle = "rounded";
popupBorderStyle = "solid";
eventHandlers.neo_tree_buffer_leave = # lua
''
function()