Nvim: Make prettier.

This commit is contained in:
Dmitry Voronin 2024-10-23 21:19:48 +03:00
parent 0781453676
commit a4a08dc7ef
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
9 changed files with 77 additions and 52 deletions

View file

@ -561,6 +561,38 @@
"type": "github" "type": "github"
} }
}, },
"nvimDressing": {
"flake": false,
"locked": {
"lastModified": 1726594554,
"narHash": "sha256-EtLYhAwoSoHyGiGrHAVYL4/CqcgO4rSbV6otO3V08hM=",
"owner": "stevearc",
"repo": "dressing.nvim",
"rev": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2",
"type": "github"
},
"original": {
"owner": "stevearc",
"repo": "dressing.nvim",
"type": "github"
}
},
"nvimGen": {
"flake": false,
"locked": {
"lastModified": 1728201978,
"narHash": "sha256-rBUltJdluSseNUiTfjBZyuBwrGrASWbW1ROVdcAW6ug=",
"owner": "David-Kunz",
"repo": "gen.nvim",
"rev": "83f1d6b6ffa6a6f32f6a93a33adc853f27541a94",
"type": "github"
},
"original": {
"owner": "David-Kunz",
"repo": "gen.nvim",
"type": "github"
}
},
"nvimGitsigns": { "nvimGitsigns": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -625,22 +657,6 @@
"type": "github" "type": "github"
} }
}, },
"nvimOllama": {
"flake": false,
"locked": {
"lastModified": 1717906114,
"narHash": "sha256-8tW5tp2GiYw+PnR7rqiKfykLW/yqvGOtqauZCgEeQCg=",
"owner": "nomnivore",
"repo": "ollama.nvim",
"rev": "45e58779fecde7ac5b8f62800bbe7180d4b48507",
"type": "github"
},
"original": {
"owner": "nomnivore",
"repo": "ollama.nvim",
"type": "github"
}
},
"nvimPlenary": { "nvimPlenary": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -775,11 +791,12 @@
"nvimCloseBuffers": "nvimCloseBuffers", "nvimCloseBuffers": "nvimCloseBuffers",
"nvimColorizer": "nvimColorizer", "nvimColorizer": "nvimColorizer",
"nvimDevicons": "nvimDevicons", "nvimDevicons": "nvimDevicons",
"nvimDressing": "nvimDressing",
"nvimGen": "nvimGen",
"nvimGitsigns": "nvimGitsigns", "nvimGitsigns": "nvimGitsigns",
"nvimGruvboxMaterial": "nvimGruvboxMaterial", "nvimGruvboxMaterial": "nvimGruvboxMaterial",
"nvimIndentoMatic": "nvimIndentoMatic", "nvimIndentoMatic": "nvimIndentoMatic",
"nvimLspconfig": "nvimLspconfig", "nvimLspconfig": "nvimLspconfig",
"nvimOllama": "nvimOllama",
"nvimPlenary": "nvimPlenary", "nvimPlenary": "nvimPlenary",
"nvimTelescope": "nvimTelescope", "nvimTelescope": "nvimTelescope",
"nvimTodo": "nvimTodo", "nvimTodo": "nvimTodo",

View file

@ -67,6 +67,14 @@
url = "github:nvim-tree/nvim-web-devicons"; url = "github:nvim-tree/nvim-web-devicons";
flake = false; flake = false;
}; };
nvimDressing = {
url = "github:stevearc/dressing.nvim";
flake = false;
};
nvimGen = {
url = "github:David-Kunz/gen.nvim";
flake = false;
};
nvimGitsigns = { nvimGitsigns = {
url = "github:lewis6991/gitsigns.nvim"; url = "github:lewis6991/gitsigns.nvim";
flake = false; flake = false;
@ -83,10 +91,6 @@
url = "github:neovim/nvim-lspconfig"; url = "github:neovim/nvim-lspconfig";
flake = false; flake = false;
}; };
nvimOllama = {
url = "github:nomnivore/ollama.nvim";
flake = false;
};
nvimPlenary = { nvimPlenary = {
url = "github:nvim-lua/plenary.nvim"; url = "github:nvim-lua/plenary.nvim";
flake = false; flake = false;

View file

@ -31,11 +31,12 @@ in
"${inputs.nvimCloseBuffers}" "${inputs.nvimCloseBuffers}"
"${inputs.nvimColorizer}" "${inputs.nvimColorizer}"
"${inputs.nvimDevicons}" "${inputs.nvimDevicons}"
"${inputs.nvimDressing}"
"${inputs.nvimGen}"
"${inputs.nvimGitsigns}" "${inputs.nvimGitsigns}"
"${inputs.nvimGruvboxMaterial}" "${inputs.nvimGruvboxMaterial}"
"${inputs.nvimIndentoMatic}" "${inputs.nvimIndentoMatic}"
"${inputs.nvimLspconfig}" "${inputs.nvimLspconfig}"
"${inputs.nvimOllama}"
"${inputs.nvimPlenary}" "${inputs.nvimPlenary}"
"${inputs.nvimTelescope}" "${inputs.nvimTelescope}"
"${inputs.nvimTodo}" "${inputs.nvimTodo}"
@ -66,8 +67,9 @@ in
./module/plugin/Align.nix ./module/plugin/Align.nix
./module/plugin/Treesitter.nix ./module/plugin/Treesitter.nix
./module/plugin/Fold.nix ./module/plugin/Fold.nix
./module/plugin/Ollama.nix ./module/plugin/Gen.nix
./module/plugin/Colorizer.nix ./module/plugin/Colorizer.nix
./module/plugin/Dressing.nix
./module/plugin/lsp/Go.nix ./module/plugin/lsp/Go.nix
./module/plugin/lsp/Haskell.nix ./module/plugin/lsp/Haskell.nix
./module/plugin/lsp/Lua.nix ./module/plugin/lsp/Lua.nix

View file

@ -22,6 +22,10 @@ let
transparent = { transparent = {
bg = lib.generators.mkLuaInline "clear"; bg = lib.generators.mkLuaInline "clear";
}; };
border = {
bg = lib.generators.mkLuaInline "clear";
fg = "#${color.accent}";
};
in in
{ {
text = '' text = ''
@ -29,15 +33,23 @@ in
group = vim.api.nvim_create_augroup('Color', {}), group = vim.api.nvim_create_augroup('Color', {}),
pattern = "*", pattern = "*",
callback = function () callback = function ()
-- Backgrounds. -- Background.
${mkHighlight "CursorLine" bg} ${mkHighlight "CursorLine" bg}
${mkHighlight "TelescopeSelection" bg} ${mkHighlight "Pmenu" bg}
${mkHighlight "PmenuExtra" bg}
-- Selection. -- Selection.
${mkHighlight "Visual" selection} ${mkHighlight "Visual" selection}
${mkHighlight "PmenuSel" selection}
${mkHighlight "TelescopeSelection" selection}
-- Transparent. -- Transparent.
${mkHighlight "NormalFloat" transparent} ${mkHighlight "NormalFloat" transparent}
-- Border.
${mkHighlight "FloatBorder" border}
${mkHighlight "FloatTitle" border}
${mkHighlight "TelescopeBorder" border}
end end
}) })
''; '';

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
text = '' text = ''
rekey_normal("<Leader>p", ":<c-u>lua require('ollama').prompt()<cr>") rekey_normal("<Leader>p", ":Gen<cr>")
rekey_visual("<Leader>p", ":<c-u>lua require('ollama').prompt()<cr>") rekey_visual("<Leader>p", ":Gen<cr>")
''; '';
} }

View file

@ -0,0 +1,6 @@
{ ... }:
{
text = ''
require("dressing").setup({ })
'';
}

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
text = ''
require("gen").setup {
model = "${config.setting.ollama.primaryModel}"
}
'';
}

View file

@ -1,18 +0,0 @@
{ config, ... }:
{
text = ''
require("ollama").setup {
model = "${config.setting.ollama.primaryModel}",
url = "http://127.0.0.1:11434",
-- View the actual default prompts in ./lua/ollama/prompts.lua
prompts = {
-- Sample_Prompt = {
-- prompt = "This is a sample prompt that receives $input and $sel(ection), among others.",
-- input_label = "> ",
-- model = "mistral",
-- action = "display",
-- }
}
}
'';
}

View file

@ -2,13 +2,7 @@
{ {
text = '' text = ''
require("telescope").setup{ require("telescope").setup{
defaults = { defaults = { },
mappings = {
i = {
["<C-?>"] = "which_key",
}
}
},
extensions = { }, extensions = { },
pickers = { }, pickers = { },
} }