add stuff

This commit is contained in:
2025-04-23 09:58:34 +02:00
parent 6eb4b228ff
commit df0600601b
7 changed files with 82 additions and 79 deletions

View File

@@ -61,8 +61,9 @@
services = {
ollama = {
enable = false;
enable = true;
acceleration = "rocm";
rocmOverrideGfx = "10.3.0";
};
printing = {

View File

@@ -1,6 +1,12 @@
{ pkgs, ... }:
{
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
services.flatpak.packages = [
{
flatpakref = "https://releases.threema.ch/flatpak/threema-desktop/ch.threema.threema-desktop.flatpakref";
sha256 = "0lghiiiphbkqgiprqirxifldvix0j4k04jh1z9f911shrzjgqq4s";
}
];
home.packages = with pkgs; [
# nix
cachix
@@ -27,6 +33,7 @@
discord
element-desktop
thunderbird
signal-desktop
# cinny-desktop
# office

View File

@@ -40,7 +40,10 @@
undotree.enable = true;
aerial.enable = true;
base = {
completion.enable = true;
completion = {
enable = true;
copilot = true;
};
diagnostics.enable = true;
coverage.enable = true;
find.enable = true;
@@ -84,41 +87,7 @@
};
};
extraPlugins = [ pkgs.vimPlugins.tiny-inline-diagnostic-nvim ];
extraConfigLua = ''
require("tiny-inline-diagnostic").setup({
preset = "modern",
hi = {
arrow = "LineNr",
background = "LineNr",
},
options = {
show_source = true,
use_icons_from_diagnostic = true,
add_messages = true,
throttle = 0,
softwrap = 30,
multiple_diag_under_cursor = true,
multilines = {
enabled = true,
always_show = true,
},
show_all_diags_on_cursorline = false,
enable_on_insert = false,
enable_on_select = false,
severity = {
vim.diagnostic.severity.ERROR,
vim.diagnostic.severity.WARN,
vim.diagnostic.severity.INFO,
vim.diagnostic.severity.HINT,
},
},
})
'';
diagnostics.virtual_text = false;
plugins = {
leap.enable = true;
vim-surround.enable = true;
which-key.enable = true;
schemastore.enable = true;
@@ -131,7 +100,6 @@
line_numbers = false;
};
};
none-ls.settings.debug = true;
lsp.servers = {
html.enable = true;
@@ -143,10 +111,5 @@
jsonls.enable = true;
taplo.enable = true;
};
copilot-lua = {
enable = true;
settings.suggestion.auto_trigger = true;
};
};
}

View File

@@ -37,7 +37,7 @@ in
autojump = true;
highlight_on_jump = false;
filter_kind = false;
open_automatic = true;
open_automatic = false;
show_guides = true;
backends = [
"lsp"

View File

@@ -1,19 +1,67 @@
{ lib, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.base.completion;
in
{
options.presets.base.completion = {
enable = lib.mkEnableOption "completion";
copilot = lib.mkEnableOption "Copilot";
ollama = lib.mkEnableOption "Ollama";
};
config = lib.mkIf cfg.enable {
extraConfigLua =
lib.mkIf cfg.ollama
#lua
''
require('minuet').setup({
provider = 'openai_fim_compatible',
n_completions = 1,
context_window = 1024,
provider_options = {
openai_fim_compatible = {
api_key = 'TERM',
name = 'Ollama',
end_point = 'http://localhost:11434/v1/completions',
model = 'deepseek-coder-v2:16b',
optional = {
max_tokens = 56,
stop = { '\n' },
top_p = 0.9,
},
},
},
virtualtext = {
show_on_completion_menu = true,
auto_trigger_ft = { "*" },
keymap = {
accept = '<A-l>',
},
},
throttle = 0,
debounce = 0,
})
'';
plugins = {
luasnip.enable = true;
lspkind = {
enable = true;
mode = "symbol_text";
};
lualine.settings.sections.lualine_x = lib.mkIf cfg.ollama (
lib.mkBefore [
{ __unkeyed-1.__raw = "require('minuet.lualine')"; }
]
);
copilot-lua = lib.mkIf cfg.copilot {
enable = true;
settings.suggestion.auto_trigger = true;
};
cmp = {
enable = true;
settings = {
@@ -53,5 +101,6 @@ in
};
};
};
extraPlugins = lib.mkIf cfg.ollama [ pkgs.vimPlugins.minuet-ai-nvim ];
};
}

View File

@@ -16,27 +16,17 @@ in
extraConfigLuaPre = # lua
''
vim.lsp.set_log_level("off")
require("actions-preview").setup({})
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
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" = "󰌵";
virtual_text.prefix = "";
signs = false;
float = {
focusable = false;
header = "";
border = "solid";
scope = "cursor";
prefix = "";
};
underline = true;
update_in_insert = true;
@@ -44,11 +34,11 @@ in
};
keymaps = [
{
key = "<leader>sa";
key = "<leader>sn";
mode = "n";
options.silent = true;
action.__raw = # lua
"require('actions-preview').code_actions";
"function() vim.diagnostic.open_float(nil) end";
}
{
key = "<leader>sx";
@@ -68,13 +58,6 @@ in
mode = "n";
action = ":IncRename ";
}
{
key = "<leader>sn";
mode = "n";
options.silent = true;
action.__raw = # lua
"vim.lsp.buf.hover";
}
{
key = "<leader>sh";
mode = "n";
@@ -86,7 +69,7 @@ in
plugins = {
lsp = {
enable = true;
inlayHints = false;
inlayHints = true;
};
telescope = {
enable = true;
@@ -96,6 +79,7 @@ in
"<leader>si" = "lsp_implementations";
"<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions";
"<leader>sa" = "quickfix";
};
};
inc-rename.enable = true;
@@ -105,11 +89,6 @@ in
group = "LSP";
icon = "󱐋";
}
{
__unkeyed-1 = "<leader>sn";
desc = "Hover";
icon = "";
}
{
__unkeyed-1 = "<leader>sr";
desc = "References";
@@ -155,6 +134,11 @@ in
desc = "Code Actions";
icon = "";
}
{
__unkeyed-1 = "<leader>sn";
desc = "Diagnostics";
icon = "";
}
{
__unkeyed-1 = "<leader>sx";
desc = "LSP Format";
@@ -162,6 +146,5 @@ in
}
];
};
extraPlugins = [ pkgs.vimPlugins.actions-preview-nvim ];
};
}

View File

@@ -214,7 +214,7 @@ hi! IlluminatedWordRead gui=none guibg={{colors.surface_container_highest.defaul
hi! IlluminatedWordWrite gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! MatchParen gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! LspInlayHint guifg={{colors.on_surface_variant.default.hex}} guibg={{colors.surface_variant.default.hex}}
hi! LspInlayHint gui=italic guifg={{colors.outline.default.hex}} guibg={{colors.surface_container_highest.default.hex}}
let g:lualine_theme = {
\ "insert": {