diff --git a/config/nvim/plugins/comment.lua b/config/nvim/plugins/comment.lua new file mode 100644 index 0000000..2ed2394 --- /dev/null +++ b/config/nvim/plugins/comment.lua @@ -0,0 +1,9 @@ +local comment = require("Comment") + +local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim") + +-- enable comment +comment.setup({ + -- for commenting tsx, jsx, svelte, html files + pre_hook = ts_context_commentstring.create_pre_hook(), +}) diff --git a/hosts/familypc/home.nix b/hosts/familypc/home.nix index 33027d7..293d962 100644 --- a/hosts/familypc/home.nix +++ b/hosts/familypc/home.nix @@ -199,6 +199,7 @@ in friendly-snippets lspkind-nvim comment-nvim + nvim-ts-context-commentstring { plugin = dracula-nvim; config = "colorscheme dracula"; @@ -217,13 +218,13 @@ in ${builtins.readFile ../../config/nvim/plugins/alpha.lua} ${builtins.readFile ../../config/nvim/plugins/autopairs.lua} ${builtins.readFile ../../config/nvim/plugins/auto-session.lua} + ${builtins.readFile ../../config/nvim/plugins/comment.lua} ${builtins.readFile ../../config/nvim/plugins/cmp.lua} ${builtins.readFile ../../config/nvim/plugins/nvim-tree.lua} ${builtins.readFile ../../config/nvim/plugins/telescope.lua} ${builtins.readFile ../../config/nvim/plugins/treesitter.lua} require("ibl").setup() require("bufferline").setup{} - require("Comment").setup() require("lualine").setup({ icons_enabled = true, theme = 'dracula',