Comments (7)
also TSModuleInfo doesn't give informations about linked filetypes (like javascriptreact)
from nvim-treesitter.
Not sure but it seems javascriptreact is actually not defined anywhere in the code.
from nvim-treesitter.
I remember that someone had a complaint about the file type changed by a plugin. Nvim-treesitter gave error messages when trying to use the parser for the buffer it was attached to but now with a different file type. After that typescriptreact was added to the used_by of the parser. Can you disable for JavaScript react once it's registered as used_by?
from nvim-treesitter.
I will look into it later today if i'm not too tired :) i think javascriptreact is indeed not set as used_by
in the js parser.
Also i should look into the js queries to see if they handle jsx stuff.
from nvim-treesitter.
I don't know if this is related. setup
behaves really weird, I tried to implement a globale disable option but it kind of fails to disable some modules once they are activated. Also when running setup
a second time some disabled modules don't get disabled once they have been enabled by enable_all
. Especially, the highlighting module since the refactor in upstream apparently is not disabled by the modules detach
function.
function M.setup(user_data)
for name, data in pairs(user_data) do
if name == 'ensure_installed' then
config.ensure_installed = data
require'nvim-treesitter.install'.ensure_installed(data)
else
data.disable = vim.list_extend(data.disable or {}, user_data.disable or {})
config.modules[name] = vim.tbl_deep_extend('force', config.modules[name] or {}, data)
recurse_modules(function(_, _, new_path)
if data.enable then
enable_all(new_path)
end
for _, lang in ipairs(config.modules[name].disable) do
disable_mod_conf_autocmd(new_path, lang)
end
end, config.modules[name]) -- note that i would use this instead of config.modules (how did this even work?)
end
end
end
from nvim-treesitter.
@kyazdani42 is this still an issue?
from nvim-treesitter.
looks like it has been fixed
from nvim-treesitter.
Related Issues (20)
- C# members are highlighted the same as variables HOT 4
- Duplicate captures HOT 1
- @comment.todo and others no longer working HOT 2
- How best to load queries from not officially supported parser? HOT 1
- Impossible pattern: content: (_) @injection.content HOT 4
- Calling `node:parent()` within an injected language returns nil instead of the parent language's nodes HOT 10
- treesitter randomly loss highlight in go file HOT 1
- C: query for control flow keywords HOT 1
- File lookup bug when `highlight = { enable = true }` HOT 3
- Nvim crashes with "Assertion failed: (did_merge), function ts_parser__handle_error" HOT 5
- Fold: allow to show last line HOT 1
- neovim freezes if ampersand on string in typescript files HOT 2
- python: arguments in Callable not highlighted as types HOT 1
- tree-sitter-disassembly issue HOT 5
- Consider adding a highlight capture for struct/enum/union keywords HOT 13
- [Question]: How to disable conceal highlight?
- E5108: Error executing lua ...nvim/lazy/nvim-treesitter/lua/nvim-treesitter/locals.lua:58: attempt to index field 'local' (a nil value) HOT 3
- nvim_treesitter#indent() should respect `breakindent` settings HOT 1
- conceal HOT 9
- Misleading capture names for type qualifiers and lifetimes HOT 4
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-treesitter.