diff --git a/config/plugins/ai/default.nix b/config/plugins/ai/default.nix new file mode 100644 index 0000000..14753a4 --- /dev/null +++ b/config/plugins/ai/default.nix @@ -0,0 +1,49 @@ +{ pkgs, ... }: { + + + plugins.codecompanion = { + + enable = true; + settings = { + adapters = { + ollama = { + __raw = '' + function() + return require('codecompanion.adapters').extend('ollama', { + env = { + url = "http://127.0.0.1:11434", + }, + schema = { + model = { + default = 'qwen2.5-coder:latest', + -- default = "llama3.1:8b-instruct-q8_0", + }, + num_ctx = { + default = 32768, + }, + }, + }) + end + ''; + }; + }; + opts = { + log_level = "TRACE"; + send_code = true; + use_default_actions = true; + use_default_prompts = true; + }; + strategies = { + agent = { + adapter = "ollama"; + }; + chat = { + adapter = "ollama"; + }; + inline = { + adapter = "ollama"; + }; + }; + }; + }; +} diff --git a/config/plugins/aw/default.nix b/config/plugins/aw/default.nix index 61da519..0acbebd 100644 --- a/config/plugins/aw/default.nix +++ b/config/plugins/aw/default.nix @@ -1,5 +1,5 @@ { pkgs, ... }: { - + # Activity watch for vim to keep track of time in files. Fuck wakatime extraPlugins = with pkgs; [ { plugin = pkgs.vimUtils.buildVimPlugin { diff --git a/config/plugins/default.nix b/config/plugins/default.nix index a7e18f7..d891cae 100644 --- a/config/plugins/default.nix +++ b/config/plugins/default.nix @@ -1,12 +1,16 @@ { pkgs, ... }: { + imports = [ + ./ai + ./aw + ./lang ./lsp ./telescope ./ui - ./aw - ./lang ]; # Persistence plugins.persistence.enable = true; + + } diff --git a/config/plugins/lang/default.nix b/config/plugins/lang/default.nix index bcb0e51..2d2a478 100644 --- a/config/plugins/lang/default.nix +++ b/config/plugins/lang/default.nix @@ -1,5 +1,6 @@ { pkgs, ... }: { + # Formatters and language servers for programming languages imports = [ ./css.nix ./docker.nix @@ -13,4 +14,5 @@ # TODO elixir # TODO java ]; + } diff --git a/config/plugins/lsp/default.nix b/config/plugins/lsp/default.nix index 2a1359e..176c6a4 100644 --- a/config/plugins/lsp/default.nix +++ b/config/plugins/lsp/default.nix @@ -2,6 +2,7 @@ imports = [ ./trouble.nix + ./neogen.nix ]; # Autocomplete diff --git a/config/plugins/lsp/neogen.nix b/config/plugins/lsp/neogen.nix new file mode 100644 index 0000000..369032d --- /dev/null +++ b/config/plugins/lsp/neogen.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + + plugins.neogen = { + enable = true; + keymaps.generated = "ag"; + }; + +} diff --git a/config/plugins/lsp/trouble.nix b/config/plugins/lsp/trouble.nix index 319f0cc..7011ad9 100644 --- a/config/plugins/lsp/trouble.nix +++ b/config/plugins/lsp/trouble.nix @@ -5,46 +5,24 @@ }; keymaps = [ - { - mode = "n"; - key = "x"; - action = "+diagnostics/quickfix"; - } { mode = "n"; key = "xx"; - action = "TroubleToggle"; + action = "Trouble diagnostics"; options = { silent = true; - desc = "Document Diagnostics (Trouble)"; - }; - } - { - mode = "n"; - key = "xX"; - action = "TroubleToggle workspace_diagnostics"; - options = { - silent = true; - desc = "Workspace Diagnostics (Trouble)"; + desc = "Show trouble diagnostics"; }; } { mode = "n"; key = "xt"; - action = "TroubleToggle todo"; + action = "Trouble TODO's"; options = { silent = true; - desc = "Todo (Trouble)"; - }; - } - { - mode = "n"; - key = "xq"; - action = "TodoQuickFix"; - options = { - silent = true; - desc = "Quickfix List (Trouble)"; + desc = "Show TODOs"; }; } + ]; } diff --git a/config/plugins/ui/default.nix b/config/plugins/ui/default.nix index a5538a5..d14776e 100644 --- a/config/plugins/ui/default.nix +++ b/config/plugins/ui/default.nix @@ -159,6 +159,10 @@ # Status bar plugins.lualine = { enable = true; + settings.sections = { + # TODO display absolute path based on project. for example on this file neo2005/config/plugins/ui/default.nix + # lualine_c = ["{ {'filename', path = 1}, },"]; + }; }; # Startup dashboard plugins.alpha = {