.config/nvim/lua/kamu/plugins/comments.lua aktualisiert
This commit is contained in:
31
.config/nvim/lua/kamu/plugins/comments.lua
Normal file
31
.config/nvim/lua/kamu/plugins/comments.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
opts = {
|
||||||
|
-- add any options here
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
|
||||||
|
-- vim.bo.commentstring = '//%s'
|
||||||
|
-- vim.api.nvim_command('set commentstring=//%s')
|
||||||
|
|
||||||
|
-- or
|
||||||
|
|
||||||
|
-- local ft = require('Comment.ft')
|
||||||
|
-- -- 1. Using set function
|
||||||
|
-- ft
|
||||||
|
-- -- Set only line comment
|
||||||
|
-- .set('yaml', '#%s')
|
||||||
|
-- -- Or set both line and block commentstring
|
||||||
|
-- .set('javascript', {'//%s', '/*%s*/'})
|
||||||
|
|
||||||
|
-- -- 2. Metatable magic
|
||||||
|
|
||||||
|
-- ft.javascript = {'//%s', '/*%s*/'}
|
||||||
|
-- ft.yaml = '#%s'
|
||||||
|
|
||||||
|
-- -- Multiple filetypes
|
||||||
|
-- ft({'go', 'rust'}, ft.get('c'))
|
||||||
|
-- ft({'toml', 'graphql'}, '#%s')
|
||||||
|
end,
|
||||||
|
lazy = false,
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
'tpope/vim-commentary',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user