Merge branch 'main' into vim-diagnostics

This commit is contained in:
raf 2025-04-04 13:47:24 +00:00 committed by GitHub
commit 963af1541e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 66 additions and 27 deletions

View file

@ -296,6 +296,7 @@
- Add lint (luacheck) and formatting (stylua) support for Lua. - Add lint (luacheck) and formatting (stylua) support for Lua.
- Add lint (markdownlint-cli2) support for Markdown. - Add lint (markdownlint-cli2) support for Markdown.
- Add catppuccin integration for Bufferline, Lspsaga.
[tebuevd](https://github.com/tebuevd): [tebuevd](https://github.com/tebuevd):
@ -311,3 +312,7 @@
- Fix oil config referencing snacks - Fix oil config referencing snacks
- Add [flash.nvim] plugin to `vim.utility.motion.flash-nvim` - Add [flash.nvim] plugin to `vim.utility.motion.flash-nvim`
[rrvsh](https://github.com/rrvsh):
- Fix namespace of python-lsp-server by changing it to python3Packages

View file

@ -47,7 +47,7 @@
}; };
python-lsp-server = { python-lsp-server = {
package = pkgs.python-lsp-server; package = pkgs.python3Packages.python-lsp-server;
lspConfig = '' lspConfig = ''
lspconfig.pylsp.setup{ lspconfig.pylsp.setup{
capabilities = capabilities; capabilities = capabilities;

View file

@ -6,6 +6,19 @@
inherit (lib.modules) mkRemovedOptionModule; inherit (lib.modules) mkRemovedOptionModule;
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.nvim.types) borderType mkPluginSetupOption; inherit (lib.nvim.types) borderType mkPluginSetupOption;
inherit (lib.nvim.lua) mkLuaInline;
uiKindSetupOpts =
if config.vim.theme.enable && config.vim.theme.name == "catppuccin"
then {
ui.kind =
mkLuaInline
# lua
''
require("catppuccin.groups.integrations.lsp_saga").custom_kind()
'';
}
else {};
in { in {
imports = [ imports = [
(mkRemovedOptionModule ["vim" "lsp" "lspsaga" "mappings"] '' (mkRemovedOptionModule ["vim" "lsp" "lspsaga" "mappings"] ''
@ -21,12 +34,14 @@ in {
options.vim.lsp.lspsaga = { options.vim.lsp.lspsaga = {
enable = mkEnableOption "LSP Saga"; enable = mkEnableOption "LSP Saga";
setupOpts = mkPluginSetupOption "lspsaga" { setupOpts =
border_style = mkOption { mkPluginSetupOption "lspsaga" {
type = borderType; border_style = mkOption {
default = config.vim.ui.borders.globalStyle; type = borderType;
description = "Border type, see {command}`:help nvim_open_win`"; default = config.vim.ui.borders.globalStyle;
}; description = "Border type, see {command}`:help nvim_open_win`";
}; };
}
// uiKindSetupOpts;
}; };
} }

View file

@ -9,7 +9,7 @@
inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.tabline.nvimBufferline; cfg = config.vim.tabline.nvimBufferline;
self = import ./nvim-bufferline.nix {inherit lib;}; self = import ./nvim-bufferline.nix {inherit config lib;};
inherit (self.options.vim.tabline.nvimBufferline) mappings; inherit (self.options.vim.tabline.nvimBufferline) mappings;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -1,4 +1,8 @@
{lib, ...}: let {
config,
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) enum bool either nullOr str int listOf attrs; inherit (lib.types) enum bool either nullOr str int listOf attrs;
inherit (lib.generators) mkLuaInline; inherit (lib.generators) mkLuaInline;
@ -23,7 +27,14 @@ in {
setupOpts = mkPluginSetupOption "Bufferline-nvim" { setupOpts = mkPluginSetupOption "Bufferline-nvim" {
highlights = mkOption { highlights = mkOption {
type = either attrs luaInline; type = either attrs luaInline;
default = {}; default =
if config.vim.theme.enable && config.vim.theme.name == "catppuccin"
then
mkLuaInline
''
require("catppuccin.groups.integrations.bufferline").get()
''
else {};
description = '' description = ''
Overrides the highlight groups of bufferline. Overrides the highlight groups of bufferline.

View file

@ -66,21 +66,22 @@ in {
transparent_background = ${boolToString transparent}, transparent_background = ${boolToString transparent},
term_colors = true, term_colors = true,
integrations = { integrations = {
nvimtree = { nvimtree = {
enabled = true, enabled = true,
transparent_panel = ${boolToString transparent}, transparent_panel = ${boolToString transparent},
show_root = true, show_root = true,
}, },
hop = true, hop = true,
gitsigns = true, gitsigns = true,
telescope = true, telescope = true,
treesitter = true, treesitter = true,
treesitter_context = true, treesitter_context = true,
ts_rainbow = true, ts_rainbow = true,
fidget = true, fidget = true,
alpha = true, alpha = true,
leap = true, leap = true,
lsp_saga = true,
markdown = true, markdown = true,
noice = true, noice = true,
notify = true, -- nvim-notify notify = true, -- nvim-notify
@ -106,9 +107,9 @@ in {
style' = style' =
warnIf (style == "light") "oxocarbon: light theme is not well-supported" style; warnIf (style == "light") "oxocarbon: light theme is not well-supported" style;
in '' in ''
require('oxocarbon') require('oxocarbon')
vim.opt.background = "${style'}" vim.opt.background = "${style'}"
vim.cmd.colorscheme = "oxocarbon" vim.cmd.colorscheme = "oxocarbon"
${optionalString transparent '' ${optionalString transparent ''
vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })

View file

@ -24,12 +24,19 @@ in {
grammars = mkOption { grammars = mkOption {
type = listOf package; type = listOf package;
default = []; default = [];
example = literalExpression ''
pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
regex
kdl
];
'';
description = '' description = ''
List of treesitter grammars to install. List of treesitter grammars to install. For grammars to be installed properly,
you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`.
For languages already supported by nvf, you may For languages already supported by nvf, you may use
use the {option}`vim.language.<lang>.treesitter` options, which {option}`vim.language.<lang>.treesitter` options, which will automatically add
will automatically add the required grammars to this. the required grammars to this.
''; '';
}; };