feat(editor): add deadcolumn for highlighting code exceeding column limit
This commit is contained in:
2 files changed
+170
-190
No files matched your search
+1
-1
@@ -5,6 +5,7 @@
|
|||||||
"better-escape.nvim": { "branch": "master", "commit": "19a38aab94961016430905ebec30d272a01e9742" },
|
"better-escape.nvim": { "branch": "master", "commit": "19a38aab94961016430905ebec30d272a01e9742" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
||||||
|
"deadcolumn.nvim": { "branch": "master", "commit": "92c86f10bfba2717ca2280e2e759b047135d5288" },
|
||||||
"floaterm": { "branch": "main", "commit": "ae3de018d20dccd9372bbff7137e8a6d6030f69e" },
|
"floaterm": { "branch": "main", "commit": "ae3de018d20dccd9372bbff7137e8a6d6030f69e" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
|
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
|
||||||
@@ -34,7 +35,6 @@
|
|||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||||
"smartcolumn.nvim": { "branch": "main", "commit": "b9cdbdf42f7ac5a659204cd5926017c7ff724a19" },
|
|
||||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
"tiny-code-action.nvim": { "branch": "main", "commit": "2b3fa2fbd25496259eaf50987097982f8ad08d1b" },
|
"tiny-code-action.nvim": { "branch": "main", "commit": "2b3fa2fbd25496259eaf50987097982f8ad08d1b" },
|
||||||
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "f64efd33a51ea89bdb847fb3aaf716e96b83ba1a" },
|
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "f64efd33a51ea89bdb847fb3aaf716e96b83ba1a" },
|
||||||
|
|||||||
+169
-189
@@ -1,203 +1,183 @@
|
|||||||
return {
|
return {
|
||||||
-- surround actions
|
-- surround actions
|
||||||
{
|
{
|
||||||
"nvim-mini/mini.surround",
|
'nvim-mini/mini.surround',
|
||||||
version = "*",
|
version = '*',
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.surround").setup()
|
require('mini.surround').setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- indent guides
|
-- indent guides
|
||||||
{
|
{
|
||||||
"nvim-mini/mini.indentscope",
|
'nvim-mini/mini.indentscope',
|
||||||
event = "VeryLazy",
|
event = 'VeryLazy',
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.indentscope").setup({
|
require('mini.indentscope').setup({
|
||||||
draw = {
|
draw = {
|
||||||
delay = 50,
|
delay = 50,
|
||||||
animation = require("mini.indentscope").gen_animation.linear({
|
animation = require('mini.indentscope').gen_animation.linear({
|
||||||
ease = "out",
|
ease = 'out',
|
||||||
duration = 15,
|
duration = 15,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
options = {
|
options = {
|
||||||
border = "top",
|
border = 'top',
|
||||||
try_as_border = true,
|
try_as_border = true,
|
||||||
indent_at_cursor = false,
|
indent_at_cursor = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- disable for certain filetypes
|
-- disable for certain filetypes
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd('BufEnter', {
|
||||||
pattern = "*",
|
pattern = '*',
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
if vim.bo[args.buf].buftype ~= "" then
|
if vim.bo[args.buf].buftype ~= '' then
|
||||||
vim.b[args.buf].miniindentscope_disable = true
|
vim.b[args.buf].miniindentscope_disable = true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Go forward/backward with square brackets
|
-- Go forward/backward with square brackets
|
||||||
{
|
{
|
||||||
"echasnovski/mini.bracketed",
|
'echasnovski/mini.bracketed',
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
event = { 'BufReadPost', 'BufNewFile' },
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.bracketed").setup()
|
require('mini.bracketed').setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- textobjects
|
-- textobjects
|
||||||
{
|
{
|
||||||
"nvim-mini/mini.ai",
|
'nvim-mini/mini.ai',
|
||||||
version = "*",
|
version = '*',
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.ai").setup({
|
require('mini.ai').setup({
|
||||||
silent = true,
|
silent = true,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- hiding colorcolumn when unneeded.
|
-- Dimming the highlights of unused functions, variables, parameters, and more.
|
||||||
{
|
{
|
||||||
"m4xshen/smartcolumn.nvim",
|
'zbirenbaum/neodim',
|
||||||
opts = {
|
enabled = false,
|
||||||
disabled_filetypes = {
|
event = 'LspAttach',
|
||||||
"netrw",
|
config = function()
|
||||||
"NvimTree",
|
require('neodim').setup({
|
||||||
"Lazy",
|
alpha = 0.5,
|
||||||
"mason",
|
blend_color = nil,
|
||||||
"help",
|
hide = {
|
||||||
"text",
|
underline = true,
|
||||||
"markdown",
|
virtual_text = true,
|
||||||
"tex",
|
signs = true,
|
||||||
"html",
|
},
|
||||||
},
|
regex = {
|
||||||
custom_colorcolumn = { lua = "90", python = "100" },
|
'[uU]nused',
|
||||||
scope = "window",
|
'[nN]ever [rR]ead',
|
||||||
},
|
'[nN]ot [rR]ead',
|
||||||
},
|
},
|
||||||
|
priority = 128,
|
||||||
|
disable = {},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Dimming the highlights of unused functions, variables, parameters, and more.
|
{
|
||||||
{
|
'numToStr/Comment.nvim',
|
||||||
"zbirenbaum/neodim",
|
version = false,
|
||||||
enabled = false,
|
dependencies = {
|
||||||
event = "LspAttach",
|
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||||
config = function()
|
},
|
||||||
require("neodim").setup({
|
config = function()
|
||||||
alpha = 0.5,
|
require('Comment').setup({
|
||||||
blend_color = nil,
|
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
|
||||||
hide = {
|
mappings = {
|
||||||
underline = true,
|
basic = true,
|
||||||
virtual_text = true,
|
extra = true,
|
||||||
signs = true,
|
},
|
||||||
},
|
})
|
||||||
regex = {
|
end,
|
||||||
"[uU]nused",
|
keys = {
|
||||||
"[nN]ever [rR]ead",
|
{ 'gcc', mode = 'n', desc = 'Toggle comment line' },
|
||||||
"[nN]ot [rR]ead",
|
{ 'gc', mode = { 'n', 'o' }, desc = 'Toggle comment linewise' },
|
||||||
},
|
{ 'gc', mode = 'x', desc = 'Toggle comment linewise (visual)' },
|
||||||
priority = 128,
|
{ 'gbc', mode = 'n', desc = 'Toggle comment block' },
|
||||||
disable = {},
|
{ 'gb', mode = { 'n', 'o' }, desc = 'Toggle comment blockwise' },
|
||||||
})
|
{ 'gb', mode = 'x', desc = 'Toggle comment blockwise (visual)' },
|
||||||
end,
|
{ '<leader>/', "<cmd>lua require('Comment.api').toggle.linewise.current()<cr>", desc = 'Toggle comment' },
|
||||||
},
|
{
|
||||||
|
'<leader>/',
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||||
|
desc = 'Toggle comment',
|
||||||
|
mode = 'v',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
-- Todo Comments
|
||||||
"numToStr/Comment.nvim",
|
{
|
||||||
version = false,
|
'folke/todo-comments.nvim',
|
||||||
dependencies = {
|
event = 'BufRead',
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
opts = {},
|
||||||
},
|
},
|
||||||
config = function()
|
|
||||||
require("Comment").setup({
|
|
||||||
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
|
|
||||||
mappings = {
|
|
||||||
basic = true,
|
|
||||||
extra = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "gcc", mode = "n", desc = "Toggle comment line" },
|
|
||||||
{ "gc", mode = { "n", "o" }, desc = "Toggle comment linewise" },
|
|
||||||
{ "gc", mode = "x", desc = "Toggle comment linewise (visual)" },
|
|
||||||
{ "gbc", mode = "n", desc = "Toggle comment block" },
|
|
||||||
{ "gb", mode = { "n", "o" }, desc = "Toggle comment blockwise" },
|
|
||||||
{ "gb", mode = "x", desc = "Toggle comment blockwise (visual)" },
|
|
||||||
{ "<leader>/", "<cmd>lua require('Comment.api').toggle.linewise.current()<cr>", desc = "Toggle comment" },
|
|
||||||
{
|
|
||||||
"<leader>/",
|
|
||||||
"<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
|
||||||
desc = "Toggle comment",
|
|
||||||
mode = "v",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Todo Comments
|
-- inline diagnostic
|
||||||
{
|
{
|
||||||
"folke/todo-comments.nvim",
|
'rachartier/tiny-inline-diagnostic.nvim',
|
||||||
event = "BufRead",
|
event = 'VeryLazy',
|
||||||
opts = {},
|
priority = 1000,
|
||||||
},
|
config = function()
|
||||||
|
require('tiny-inline-diagnostic').setup()
|
||||||
|
vim.diagnostic.config({ virtual_text = false }) -- Disable default virtual text
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- inline diagnostic
|
-- code action
|
||||||
{
|
{
|
||||||
"rachartier/tiny-inline-diagnostic.nvim",
|
'rachartier/tiny-code-action.nvim',
|
||||||
event = "VeryLazy",
|
dependencies = {
|
||||||
priority = 1000,
|
{
|
||||||
config = function()
|
'folke/snacks.nvim',
|
||||||
require("tiny-inline-diagnostic").setup()
|
opts = {
|
||||||
vim.diagnostic.config({ virtual_text = false }) -- Disable default virtual text
|
terminal = {},
|
||||||
end,
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
event = 'LspAttach',
|
||||||
|
config = function()
|
||||||
|
local codeaction = require('tiny-code-action')
|
||||||
|
|
||||||
-- code action
|
codeaction.setup({
|
||||||
{
|
picker = {
|
||||||
"rachartier/tiny-code-action.nvim",
|
'buffer',
|
||||||
dependencies = {
|
opts = {
|
||||||
{
|
auto_preview = true,
|
||||||
"folke/snacks.nvim",
|
hotkeys = true,
|
||||||
opts = {
|
hotkeys_mode = 'sequential',
|
||||||
terminal = {},
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
},
|
|
||||||
event = "LspAttach",
|
|
||||||
config = function()
|
|
||||||
local codeaction = require("tiny-code-action")
|
|
||||||
|
|
||||||
codeaction.setup({
|
vim.keymap.set('n', '<leader>.', codeaction.code_action)
|
||||||
picker = {
|
end,
|
||||||
"buffer",
|
},
|
||||||
opts = {
|
|
||||||
auto_preview = true,
|
|
||||||
hotkeys = true,
|
|
||||||
hotkeys_mode = "sequential",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>.", codeaction.code_action)
|
-- visual multi
|
||||||
end,
|
{
|
||||||
},
|
'mg979/vim-visual-multi',
|
||||||
|
event = 'VeryLazy',
|
||||||
-- visual multi
|
init = function()
|
||||||
{
|
vim.g.VM_maps = {
|
||||||
"mg979/vim-visual-multi",
|
['Find Under'] = '<M-d>',
|
||||||
event = "VeryLazy",
|
['Find Subword Under'] = '<M-d>',
|
||||||
init = function()
|
['Select All'] = '<C-M-d>',
|
||||||
vim.g.VM_maps = {
|
['Add Cursor Down'] = '<C-M-j>',
|
||||||
["Find Under"] = "<M-d>",
|
['Add Cursor Up'] = '<C-M-k>',
|
||||||
["Find Subword Under"] = "<M-d>",
|
}
|
||||||
["Select All"] = "<C-M-d>",
|
end,
|
||||||
["Add Cursor Down"] = "<C-M-j>",
|
},
|
||||||
["Add Cursor Up"] = "<C-M-k>",
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user