Nvim : Fix Trouble & add transparency plugin.

This commit is contained in:
Dmitry Voronin 2024-09-29 20:37:48 +03:00
parent f7b93dc97d
commit 1cad98a7ac
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
7 changed files with 57 additions and 10 deletions

View file

@ -753,6 +753,22 @@
"type": "github"
}
},
"nvimTransparent": {
"flake": false,
"locked": {
"lastModified": 1724573095,
"narHash": "sha256-6jOLgcWqnVzabT2+CehY92Z4mYzJHiRiInn5T5OXqZE=",
"owner": "xiyaowong",
"repo": "transparent.nvim",
"rev": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21",
"type": "github"
},
"original": {
"owner": "xiyaowong",
"repo": "transparent.nvim",
"type": "github"
}
},
"nvimTree": {
"flake": false,
"locked": {
@ -848,6 +864,7 @@
"nvimTelescope": "nvimTelescope",
"nvimTodo": "nvimTodo",
"nvimTokyonight": "nvimTokyonight",
"nvimTransparent": "nvimTransparent",
"nvimTree": "nvimTree",
"nvimTreesitter": "nvimTreesitter",
"nvimTrouble": "nvimTrouble",

View file

@ -106,6 +106,10 @@
url = "github:folke/tokyonight.nvim";
flake = false;
};
nvimTransparent = {
url = "github:xiyaowong/transparent.nvim";
flake = false;
};
nvimTree = {
url = "github:nvim-tree/nvim-tree.lua";
flake = false;

View file

@ -33,6 +33,7 @@ in {
"${inputs.nvimTelescope}"
"${inputs.nvimTodo}"
"${inputs.nvimTokyonight}"
"${inputs.nvimTransparent}"
"${inputs.nvimTreesitter}"
"${inputs.nvimTree}"
"${inputs.nvimTrouble}"
@ -61,6 +62,7 @@ in {
./module/plugin/Fold.nix
./module/plugin/Ollama.nix
./module/plugin/Colorizer.nix
./module/plugin/Transparent.nix
./module/plugin/lsp/Haskell.nix
./module/plugin/lsp/Rust.nix
./module/plugin/lsp/Tex.nix
@ -77,7 +79,6 @@ in {
./module/key/Sort.nix
./module/key/Telescope.nix
./module/key/Terminal.nix
./module/key/Todo.nix
./module/key/Trouble.nix
];
};

View file

@ -4,7 +4,7 @@
vim.opt.clipboard = "unnamedplus"
vim.opt.cursorline = false
vim.opt.fixeol = false
vim.opt.incsearch = true;
vim.opt.incsearch = true
vim.opt.number = true
vim.opt.scrolloff = 4
vim.opt.splitbelow = true

View file

@ -1,6 +0,0 @@
{ ... }: {
text = ''
-- Toggle To-do window.
rekey_normal("<Leader>3", "<cmd>TroubleToggle todo<cr>")
'';
}

View file

@ -1,6 +1,11 @@
{ ... }: {
{ ... }: let
focus = true;
in {
text = ''
-- Toggle diagnostics window.
rekey_normal("<Leader>2", "<cmd>TroubleToggle document_diagnostics<cr>")
rekey_normal("<Leader>2", "<cmd>Trouble diagnostics toggle focus=${toString focus}<cr>")
-- Toggle To-do window.
rekey_normal("<Leader>3", "<cmd>Trouble todo toggle focus=${toString focus}<cr>")
'';
}

View file

@ -0,0 +1,26 @@
{ ... }: {
text = ''
vim.g.transparent_enabled = true
-- Optional, you don't have to run setup.
require("transparent").setup({
-- table: default groups
-- groups = {
-- 'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier',
-- 'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function',
-- 'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText',
-- 'SignColumn', 'CursorLine', 'CursorLineNr', 'StatusLine', 'StatusLineNC',
-- 'EndOfBuffer',
-- },
-- table: additional groups that should be cleared
extra_groups = {
'NormalFloat',
},
-- table: groups you don't want to clear
exclude_groups = {},
-- function: code to be executed after highlight groups are cleared
-- Also the user event "TransparentClear" will be triggered
on_clear = function() end,
})
'';
}