-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: normalize mappings and make them dependent on the plugin th…
…at provides the functionality
- Loading branch information
Showing
46 changed files
with
740 additions
and
913 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,54 @@ | ||
local prefix = "<leader>u" | ||
return { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
[prefix .. "T"] = { desc = "Toggle transparency" }, | ||
"xiyaowong/transparent.nvim", | ||
lazy = false, | ||
dependencies = { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
["<Leader>uT"] = { desc = "Toggle transparency" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"xiyaowong/transparent.nvim", | ||
lazy = false, | ||
opts = { | ||
-- table: default groups | ||
groups = { | ||
"Normal", | ||
"NormalNC", | ||
"Comment", | ||
"Constant", | ||
"Special", | ||
"Identifier", | ||
"Statement", | ||
"PreProc", | ||
"Type", | ||
"Underlined", | ||
"Todo", | ||
"String", | ||
"Function", | ||
"Conditional", | ||
"Repeat", | ||
"Operator", | ||
"Structure", | ||
"LineNr", | ||
"NonText", | ||
"SignColumn", | ||
"CursorLineNr", | ||
"CursorLine", | ||
"EndOfBuffer", | ||
}, | ||
-- table: additional groups that should be cleared | ||
extra_groups = { | ||
"NormalFloat", | ||
"NvimTreeNormal", | ||
"NeoTreeNormal", | ||
"NeoTreeFloatBorder", | ||
"NeoTreeNormalNC", | ||
}, | ||
-- table: groups you don't want to clear | ||
exclude_groups = {}, | ||
opts = { | ||
-- table: default groups | ||
groups = { | ||
"Normal", | ||
"NormalNC", | ||
"Comment", | ||
"Constant", | ||
"Special", | ||
"Identifier", | ||
"Statement", | ||
"PreProc", | ||
"Type", | ||
"Underlined", | ||
"Todo", | ||
"String", | ||
"Function", | ||
"Conditional", | ||
"Repeat", | ||
"Operator", | ||
"Structure", | ||
"LineNr", | ||
"NonText", | ||
"SignColumn", | ||
"CursorLineNr", | ||
"CursorLine", | ||
"EndOfBuffer", | ||
}, | ||
-- table: additional groups that should be cleared | ||
extra_groups = { | ||
"NormalFloat", | ||
"NvimTreeNormal", | ||
"NeoTreeNormal", | ||
"NeoTreeFloatBorder", | ||
"NeoTreeNormalNC", | ||
}, | ||
-- table: groups you don't want to clear | ||
exclude_groups = {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
return { | ||
{ | ||
"Astronvim/astrocore", | ||
opts = { | ||
mappings = { | ||
["<leader>uT"] = { "<cmd>Twilight<cr>", desc = "Toggle Twilight" }, | ||
"folke/twilight.nvim", | ||
dependencies = { | ||
{ | ||
"Astronvim/astrocore", | ||
opts = { | ||
mappings = { | ||
["<Leader>uT"] = { "<CMD>Twilight<CR>", desc = "Toggle Twilight" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"folke/twilight.nvim", | ||
cmd = { | ||
"Twilight", | ||
"TwilightEnable", | ||
"TwilightDisable", | ||
}, | ||
cmd = { | ||
"Twilight", | ||
"TwilightEnable", | ||
"TwilightDisable", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
return { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
{ "f<Enter>", desc = "Highlight" }, | ||
{ "f<BS>", desc = "Remove Highlight" }, | ||
{ "f<C-L>", desc = "Clear Highlight" }, | ||
{ "f<Tab>", desc = "Find Highlight (similar to Telescope grep)" }, | ||
{ "nn", "<cmd>Hi><CR>", desc = "Next Recently Set Highlight" }, | ||
{ "ng", "<cmd>Hi<<CR>", desc = "Previous Recently Set Highlight" }, | ||
{ "n[", "<cmd>Hi{<CR>", desc = "Next Nearest Highlight" }, | ||
{ "n]", "<cmd>Hi}<CR>", desc = "Previous Nearest Highlight" }, | ||
"azabiong/vim-highlighter", | ||
lazy = false, -- Not Lazy by default | ||
dependencies = { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
{ "f<Enter>", desc = "Highlight" }, | ||
{ "f<BS>", desc = "Remove Highlight" }, | ||
{ "f<C-L>", desc = "Clear Highlight" }, | ||
{ "f<Tab>", desc = "Find Highlight (similar to Telescope grep)" }, | ||
{ "nn", "<CMD>Hi><CR>", desc = "Next Recently Set Highlight" }, | ||
{ "ng", "<CMD>Hi<<CR>", desc = "Previous Recently Set Highlight" }, | ||
{ "n[", "<CMD>Hi{<CR>", desc = "Next Nearest Highlight" }, | ||
{ "n]", "<CMD>Hi}<CR>", desc = "Previous Nearest Highlight" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"azabiong/vim-highlighter", | ||
lazy = false, -- Not Lazy by default | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
local prefix = "<leader>fd" | ||
local prefix = "<Leader>fd" | ||
|
||
return { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
[prefix .. "c"] = { | ||
"<cmd>lua require('telescope').extensions.dap.commands()<cr>", | ||
desc = "Telescope DAP commands", | ||
}, | ||
[prefix .. "f"] = { | ||
"<cmd>lua require('telescope').extensions.dap.frames()<cr>", | ||
desc = "Telescope DAP frames", | ||
}, | ||
[prefix .. "g"] = { | ||
"<cmd>lua require('telescope').extensions.dap.configurations()<cr>", | ||
desc = "Telescope DAP configurations", | ||
}, | ||
[prefix .. "l"] = { | ||
"<cmd>lua require('telescope').extensions.dap.list_breakpoints()<cr>", | ||
desc = "Telescope DAP list breakpoints", | ||
}, | ||
[prefix .. "v"] = { | ||
"<cmd>lua require('telescope').extensions.dap.variables()<cr>", | ||
desc = "Telescope DAP variables", | ||
"nvim-telescope/telescope.nvim", | ||
dependencies = { | ||
"nvim-telescope/telescope-dap.nvim", | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
[prefix .. "c"] = { | ||
"<CMD>lua require('telescope').extensions.dap.commands()<CR>", | ||
desc = "Telescope DAP commands", | ||
}, | ||
[prefix .. "f"] = { | ||
"<CMD>lua require('telescope').extensions.dap.frames()<CR>", | ||
desc = "Telescope DAP frames", | ||
}, | ||
[prefix .. "g"] = { | ||
"<CMD>lua require('telescope').extensions.dap.configurations()<CR>", | ||
desc = "Telescope DAP configurations", | ||
}, | ||
[prefix .. "l"] = { | ||
"<CMD>lua require('telescope').extensions.dap.list_breakpoints()<CR>", | ||
desc = "Telescope DAP list breakpoints", | ||
}, | ||
[prefix .. "v"] = { | ||
"<CMD>lua require('telescope').extensions.dap.variables()<CR>", | ||
desc = "Telescope DAP variables", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"nvim-telescope/telescope.nvim", | ||
dependencies = { "nvim-telescope/telescope-dap.nvim" }, | ||
opts = function() require("telescope").load_extension "dap" end, | ||
}, | ||
opts = function() require("telescope").load_extension "dap" end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
return { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
["<leader>uD"] = { function() require("lsp_lines").toggle() end, desc = "Toggle virtual diagnostic lines" }, | ||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim", | ||
event = "LspAttach", | ||
dependencies = { | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
["<Leader>uD"] = { function() require("lsp_lines").toggle() end, desc = "Toggle virtual diagnostic lines" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim", | ||
event = "LspAttach", | ||
opts = {}, | ||
config = function(_, opts) | ||
-- disable diagnostic virtual text | ||
local lsp_utils = require "astrolsp" | ||
opts = {}, | ||
config = function(_, opts) | ||
-- disable diagnostic virtual text | ||
local lsp_utils = require "astrolsp" | ||
|
||
lsp_utils.diagnostics[3].virtual_text = false | ||
vim.diagnostic.config(lsp_utils.diagnostics[vim.g.diagnostics_mode]) | ||
require("lsp_lines").setup(opts) | ||
end, | ||
}, | ||
lsp_utils.diagnostics[3].virtual_text = false | ||
vim.diagnostic.config(lsp_utils.diagnostics[vim.g.diagnostics_mode]) | ||
require("lsp_lines").setup(opts) | ||
end, | ||
} |
Oops, something went wrong.