-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding custom snippets and switching from
mini.comments
to `…
…ts-comments`
- Loading branch information
1 parent
3c76515
commit da62cc9
Showing
18 changed files
with
558 additions
and
189 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
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,39 +1,12 @@ | ||
---@type LazySpec | ||
return { | ||
{ | ||
'numToStr/Comment.nvim', | ||
enabled = false, | ||
keys = { | ||
{ 'gc', mode = { 'x', 'n' }, desc = 'comment' }, | ||
{ 'gb', desc = 'Comment(block)' }, | ||
{ '<leader>/', '<cmd>lua require("Comment.api").toggle.linewise.current()<CR>', desc = 'Toggle Comment' }, | ||
{ | ||
'<leader>/', | ||
function() | ||
local esc = vim.api.nvim_replace_termcodes('<ESC>', true, false, true) | ||
vim.api.nvim_feedkeys(esc, 'nx', false) | ||
require('Comment.api').toggle.linewise(vim.fn.visualmode()) | ||
end, | ||
mode = 'v', | ||
desc = 'Toggle Comment', | ||
}, | ||
{ '<A-/>', '"ayy"ap<cmd>lua require("Comment.api").toggle.linewise.current()<CR>', desc = 'Toggle Comment' }, | ||
'folke/ts-comments.nvim', | ||
opts = { | ||
lang = { | ||
jsdoc = '/** %s */', | ||
phpdoc = { '// %s' }, | ||
}, | ||
dependencies = { | ||
{ | ||
'JoosepAlviste/nvim-ts-context-commentstring', | ||
config = function() | ||
-- vim.g.skip_ts_context_commentstring_module = true | ||
require('ts_context_commentstring').setup({ | ||
enable_autocmd = false, | ||
}) | ||
end, | ||
}, | ||
}, | ||
config = function() | ||
require('Comment').setup({ | ||
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(), | ||
}) | ||
end, | ||
}, | ||
event = 'VeryLazy', | ||
enabled = vim.fn.has 'nvim-0.10.0' == 1, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
---@type LazySpec | ||
return { | ||
'Dan7h3x/LazyDo', | ||
keys = { -- recommended keymap for easy toggle LazyDo in normal and insert modes (arbitrary) | ||
{ | ||
'<F2>', | ||
'<CMD>LazyDoToggle<CR>', | ||
mode = { 'n', 'i' }, | ||
desc = 'Toggle LazyDo', | ||
}, | ||
}, | ||
opts = {}, | ||
} |
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
Oops, something went wrong.