Comments (2)
Thanks for your prompt response and help @JoosepAlviste!
I was missing Treesitter vue parser.
:TSInstall vue
has indeed fixed the issue. Not sure how I've managed working with vue for so long without having that parser...
require('nvim-treesitter.configs').setup {
ensure_installed = { ... 'javascript', 'typescript', 'vue' },
}
thanks again for your help and great plugin!
from nvim-ts-context-commentstring.
Hey! Sorry to hear that you're having problems. Here are a couple things you could try:
- Set the
enable_autocmd
command tofalse
:
{
'JoosepAlviste/nvim-ts-context-commentstring',
opts = {
enable_autocmd = false,
},
},
I doubt that this would fix the issue, but it at least makes sure to call the setup
function and does not set up the autocmd
on CursorHold
.
- Make sure that you have installed the Treesitter parsers (
:TSInstall vue
and:TSInstall typescript
) - What does
:=require('ts_context_commentstring').calculate_commentstring()
return in the TypeScript block? It should return// %s
- Try adding a print to the
pre_hook
to make sure that it's actually called:
{ 'numToStr/Comment.nvim',
config = function()
require('Comment').setup {
pre_hook = function()
vim.print('hello')
return 'hehe %s'
end,
}
end,
},
- Try out the minimal config here to make sure that nothing in your own config is breaking the plugin.
Maybe some of those things help to figure out what's going wrong.
from nvim-ts-context-commentstring.
Related Issues (20)
- Can't make it work with Vue, Comment.nvim and lazy.nvim HOT 5
- failed to install HOT 5
- module 'ts-context-com mentstring.integrations.comment_nvim' not found: HOT 3
- Configure without tree-sitter HOT 3
- trouble getting this to work with jsx HOT 3
- mini.comment integration pre hook - require("ts_context_commentstring.internal").update_commentstring() requires 1 argument HOT 5
- Option 'commentstring' is empty in .swift file HOT 3
- Does this work well when nvim-treesitter 1.0 is out? HOT 4
- plugin cause j/k position incorrect HOT 6
- tsx is not properly commenting HOT 8
- Vue comment not working properly HOT 2
- This plugin doesn't set the `comments` var. HOT 2
- BREAKING CHANGES HOT 6
- Incorrent commentstring for inline markdown code blocks HOT 4
- `set ft?` return `filetype=on` and causing losing syntax highlighting HOT 5
- Commenting is slow in large Markdown files HOT 3
- context_commentstring nvim-treesitter module is deprecated HOT 2
- tsx is not properly commenting even when ts-context-commentstring works HOT 1
- Please do not create unnecessary global variables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-ts-context-commentstring.