1
0

fix: switch commenting plugin for better vue file support

This commit is contained in:
Rokas Puzonas 2021-11-23 14:34:03 +02:00
parent 6b76cba0e2
commit 1078cc9d3b
2 changed files with 15 additions and 2 deletions

9
lua/config/comment.lua Normal file
View File

@ -0,0 +1,9 @@
local config = {}
if packer_plugins['nvim-ts-context-commentstring'] and packer_plugins['nvim-ts-context-commentstring'].loaded then
config.hook = function()
require("ts_context_commentstring.internal").update_commentstring()
end
end
require("nvim_comment").setup(config)

View File

@ -83,8 +83,12 @@ local function usePlugins(use, use_rocks)
-- Smooth smooth scrolling -- Smooth smooth scrolling
use 'psliwka/vim-smoothie' use 'psliwka/vim-smoothie'
-- Toggle comments -- Commenting
use 'tpope/vim-commentary' use {
'terrortylor/nvim-comment',
config = [[require 'config.comment']],
requires = 'JoosepAlviste/nvim-ts-context-commentstring'
}
-- Color code colorizer -- Color code colorizer
use { 'norcalli/nvim-colorizer.lua', config = [[require 'config.colorizer']] } use { 'norcalli/nvim-colorizer.lua', config = [[require 'config.colorizer']] }