diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 5fbbe2e..4522cf8 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -45,7 +45,7 @@ in enable = mkEnableOption "enable"; type = mkOption { default = "amd"; - description = "The type of ollama package to install, accelerated by an AMD GPU, NVIDIA GPU or CPU."; + description = "The type of ollama package to install, AMD GPU accelerated or NVIDIA GPU accelerated."; example = "amd"; type = types.enum [ "amd" diff --git a/modules/neovim/lua/plugins/nvim-ufo.lua b/modules/neovim/lua/plugins/nvim-ufo.lua new file mode 100644 index 0000000..72fdaf8 --- /dev/null +++ b/modules/neovim/lua/plugins/nvim-ufo.lua @@ -0,0 +1,32 @@ +---@type LazySpec +return { + "wizardlink/nvim-ufo", + opts = { + provider_selector = function(_, filetype, _) + ---@type table + local ftDefaults = { + cs = "treesitter", + } + + local function handleFallbackException(bufnr, err, providerName) + if type(err) == "string" and err:match "UfoFallbackException" then + return require("ufo").getFolds(bufnr, providerName) + else + return require("promise").reject(err) + end + end + + return ftDefaults[filetype] + or function(bufnr) + return require("ufo") + .getFolds(bufnr, "lsp") + :catch(function(err) + return handleFallbackException(bufnr, err, "treesitter") + end) + :catch(function(err) + return handleFallbackException(bufnr, err, "indent") + end) + end + end, + }, +} diff --git a/modules/neovim/lua/plugins/user.lua b/modules/neovim/lua/plugins/user.lua index 33b8f83..9da5d9c 100644 --- a/modules/neovim/lua/plugins/user.lua +++ b/modules/neovim/lua/plugins/user.lua @@ -90,13 +90,35 @@ return { opts = function(_, opts) local transparent = require "transparent" - opts.exclude_groups = { - "StatusLine", - "StatusLineNC", + opts.groups = { + "Comment", + "Conditional", + "Constant", + "CursorLine", + "CursorLineNr", + "EndOfBuffer", + "Function", + "Identifier", + "LineNr", + "NonText", + "Normal", + "NormalNC", + "Operator", + "PreProc", + "Repeat", + "SignColumn", + "Special", + "Statement", + -- "StatusLine", + -- "StatusLineNC", + "String", + "Structure", + "Todo", + "Type", + "Underlined", } opts.extra_groups = { - "BlinkCmpSignatureHelpActiveParameter", "CursorColumn", "CursorLineFold", "CursorLineSign", diff --git a/shared/home-manager/dotfiles/git.nix b/shared/home-manager/dotfiles/git.nix index 1d5ae80..f74e79b 100644 --- a/shared/home-manager/dotfiles/git.nix +++ b/shared/home-manager/dotfiles/git.nix @@ -4,7 +4,6 @@ # Enable GIT. programs.git = { enable = true; - lfs.enable = true; aliases = { # List aliases