-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emmet-expand-abbr
fails in getFileType
when there is no treesitter syntax (E701: Invalid type for len()
)
#559
Comments
Is there a fix or known workaround for this? |
Thirded, a fix for this would be great. I've had to pin this plugin at commit 3fb2f63 to avoid the problem. |
kmoschcau
added a commit
to kmoschcau/nvim-config
that referenced
this issue
Oct 23, 2024
@diegotoral @nnnell If you haven't seen it yet, I opened a PR to fix this problem. You could just use my fork for that PR as a temporary fix. |
kmoschcau
changed the title
Dec 30, 2024
emmet-expand-abbr
fails in getFileType
when there is no treesitter syntaxemmet-expand-abbr
fails in getFileType
when there is no treesitter syntax (E701: Invalid type for len())
kmoschcau
changed the title
Dec 30, 2024
emmet-expand-abbr
fails in getFileType
when there is no treesitter syntax (E701: Invalid type for len())emmet-expand-abbr
fails in getFileType
when there is no treesitter syntax (E701: Invalid type for len()
)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getFileType
contains this piece of code:However the assumptions here are flawed.
g:loaded_nvim_treesitter
isv:true
, even if there is no treesitter parser or grammar for the current filetype. Thustype
gets set tov:null
in files with only regex syntax highlighting. This then causes an error later down the line when trying to calllen(type)
. There needs to be an alternative or more thorough check, that treesitter actually returns a file type.The error is:
E701: Invalid type for len()
The text was updated successfully, but these errors were encountered: