| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit 5732aa706c639b3d775573d91d1139f24624629c.
Causes editor to freeze in projects with many watcher registrations
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Dhall files are not recognized.
Solution: Add patterns for Dhall files. (Amaan Qureshi, closes vim/vim#12052)
https://github.com/vim/vim/commit/def5521752abefe12db8cc3111a3b205ad1ac929
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
|
|
|
|
|
|
|
| |
Problem: CPON files are not recognized.
Solution: Add patterns for CPON files. (Amaan Qureshi, closes vim/vim#12053)
https://github.com/vim/vim/commit/c2254764bcada43eea894eb5852a26d5ac5ca8b0
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
| |
|
|
|
| |
Simply use `pcall` if you want to silence an error.
|
|
|
|
|
|
| |
Problem: Un-grammar files are not recognized.
Solution: Add patterns for Un-grammar files. (Amaan Qureshi, closes vim/vim#12034)
https://github.com/vim/vim/commit/44e08c1cf83f5a50f8b21613551304a6651c1161
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Starlark files are not recognized.
Solution: Add patterns for Starlark files. (Amaan Qureshi, closes vim/vim#12049)
https://github.com/vim/vim/commit/ca06b30073de22dc120b532e90fbee2a10ef9772
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Treesitter injections are slow because all injected trees are invalidated on every change.
Solution:
Implement smarter invalidation to avoid reparsing injected regions.
- In on_bytes, try and update self._regions as best we can. This PR just offsets any regions after the change.
- Add valid flags for each region in self._regions.
- Call on_bytes recursively for all children.
- We still need to run the query every time for the top level tree. I don't know how to avoid this. However, if the new injection ranges don't change, then we re-use the old trees and avoid reparsing children.
This should result in roughly a 2-3x reduction in tree parsing when the comment injections are enabled.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
close #21063
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This function replaces both vim.treesitter.get_node_at_pos() and
vim.treesitter.get_node_at_cursor(). These two functions are similar
enough that they don't need separate interfaces. Even worse,
get_node_at_pos() returns a TSNode while get_node_at_cursor() returns a
string, so the two functions behave slightly differently.
vim.treesitter.get_node() combines these two into a more streamlined
interface. With no arguments, it returns the node under the cursor in
the current buffer. Optionally, it can accept a buffer number or a
position to get the node at a given position in a given buffer.
|
|
|
|
|
|
|
|
|
| |
Problem: Yuck files are not recognized.
Solution: Add a filetype pattern for yuck files. (Amaan Qureshi,
closes vim/vim#12033)
https://github.com/vim/vim/commit/cfce5cf542db20c7beba5b4211c0ae3305a64a43
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
vim.treesitter does not know how to map a specific filetype to a parser.
This creates problems since in a few places (including in vim.treesitter itself), the filetype is incorrectly used in place of lang.
Solution:
Add an API to enable this:
- Add vim.treesitter.language.add() as a replacement for vim.treesitter.language.require_language().
- Optional arguments are now passed via an opts table.
- Also takes a filetype (or list of filetypes) so we can keep track of what filetypes are associated with which langs.
- Deprecated vim.treesitter.language.require_language().
- Add vim.treesitter.language.get_lang() which returns the associated lang for a given filetype.
- Add vim.treesitter.language.register() to associate filetypes to a lang without loading the parser.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: PRQL files are not recognized.
Solution: Add a filetype pattern for PRQL files. (Matthias Queitsch,
closes vim/vim#12018)
https://github.com/vim/vim/commit/9de960ace0f017fcfeaf64a2f6492f0f88b11fdb
Co-authored-by: Matthias Queitsch <matthias.queitsch@mailbox.org>
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original motivation for this change came from developping
https://github.com/neovim/neovim/pull/22159, which will require adding
more autocommand creation to Neovim's startup sequence.
This change requires lightly editing a test that expected no autocommand
to have been created from lua.
|
| |
| |
| |
| |
| |
| | |
If nothing matched in match_from_hashbang, also check the file extension table.
For a hashbang like '#!/bin/env foo', this will set the filetype to 'fooscript'
assuming the filetype for the 'foo' extension is 'fooscript' in the extension
table.
|
|\ \
| | |
| | | |
feat(treesitter): playground improvements
|
| | |
| | |
| | |
| | |
| | | |
This allows vim.treesitter.show_tree() to work on buffers where the
filetype does not match the parser language name e.g, bash/sh.
|
| |/
| |
| |
| |
| |
| | |
- Render node ranges as virtual text
- Set filettype=query. The virtual text is to avoid parsing errors.
- Make sure highlights text is always in view.
|
|/
|
| |
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
|
|
|
|
|
|
|
| |
Problem: Move language files are not recognized.
Solution: Recognize Move language files. (Amaan Qureshi, closes vim/vim#11947)
https://github.com/vim/vim/commit/6642982beaf4f1f5164f0315a1b3e3c275156089
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
|
|
|
|
|
|
|
| |
Problem: FunC files are not recognized.
Solution: Recognize FunC files. (Amaan Qureshi, closes vim/vim#11949)
https://github.com/vim/vim/commit/91deac45392fe93094b9c31403b1ae771dc71938
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
|
|
|
|
|
| |
Problem: Ron files are not recognized.
Solution: Recognize Ron files. (Amaan Qureshi, closes vim/vim#11948)
https://github.com/vim/vim/commit/c8ef30bc2eaec956549510cd4b2efc96b7aee563
|
|\
| |
| | |
feat(treesitter): allow capture text to be transformed
|
| | |
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
|
|/
|
|
|
|
|
|
| |
Problem: Cadence files are not recognized.
Solution: Recognize Cadence files. (Janez Podhostnik, closes vim/vim#11951)
https://github.com/vim/vim/commit/cb626a4692df7154be02b47d6089ec679e95cb44
Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: go.work.sum files are not recognized.
Solution: Recognize go.work.sum files as the gosum filetype. (Amaan Qureshi,
closes vim/vim#11940)
https://github.com/vim/vim/commit/4ad8ae8465e30df38dba31910f130891b16d38a0
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Problem: FIRRTL files are not recognized.
Solution: Add a pattern for FIRRTL files. (Amaan Qureshi, closes vim/vim#11931)
https://github.com/vim/vim/commit/685bf83b73d0fe6fd36bb2949bebd6aae66a139e
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: .clangd and .stylelintrc files don't get a filetype.
Solution: Use yaml for .clangd and json for .stylelintrc files. (Mark
Skelton, closes vim/vim#11916)
https://github.com/vim/vim/commit/9c51798a1f3b79ace5ae0551a8bb122025ac94ed
Co-authored-by: Mark Skelton <mdskelton99@gmail.com>
|
|\
| |
| | |
refactor(tests): run unittests using main nvim binary - delete separate nvim-test build
|
| | |
|
|\ \
| |/
|/| |
fix(treesitter): validate language name
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Some injections (like markdown) allow specifying arbitrary
language names for code blocks, which may be lead to errors when
looking for a corresponding parser in runtime path.
Solution: Validate that the language name only contains alphanumeric
characters and `_` (e.g., for `c_sharp`) and error otherwise.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: KDL files are not recognized.
Solution: Add a pattern for KDL files. (Amaan Qureshi, closes vim/vim#11898)
https://github.com/vim/vim/commit/907349a74331fc1bc48cf43c1e7d54cb9e0e4fc9
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Problem: Elsa files are not recognized.
Solution: Add the name of Elsa files. (Amaan Qureshi)
https://github.com/vim/vim/commit/2a99fe6c41efcd5d1eb47823e7e73cf391e230ba
|