| Commit message (Collapse) | Author | Age |
... | |
| | |
| | |
| | |
| | |
| | | |
Problem: gitattributes files are not recognized.
Solution: Add patterns to match gitattributes files. (closes vim/vim#11085)
https://github.com/vim/vim/commit/7d56cfc861e57145f003315efd835cf5dfd5b145
|
| | | |
|
| |/
| |
| | |
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
| |
| |
| |
| |
| |
| | |
Problem: Jsonnet files are not recognized.
Solution: Add a pattern for Jsonnet files. (Cezary Drożak, closes vim/vim#11073,
closes vim/vim#11081)
https://github.com/vim/vim/commit/2a4c885d54171f68ec2c2d6eb4ae281c7fefb802
|
| | |
|
| |\
| | |
| | |
| | | |
* feat(treesitter): upstream get_{node,captures} utility functions
* refactor(treesitter): get_{nodes,captures}_at_{position,cursor}
|
| | | |
|
| | |
| | |
| | |
| | | |
Util from the nvim-treesitter project.
|
| | |
| | |
| | |
| | |
| | | |
Use the first, not last, query for a language on runtimepath. Typically,
this implies that a user query will override a site plugin query, which
will override a bundled runtime query.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Treesitter queries for a given language in runtime were merged together,
leading to errors if they targeted different parser versions (e.g., bundled viml queries
and those shipped by nvim-treesitter).
Solution: Runtime queries now work as follows:
* The last query in the rtp without `; extends` in the header will be used as the base query
* All queries (without a specific order) with `; extends` are concatenated with the base query
BREAKING CHANGE: queries need to be updated if they are meant to extend other queries
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Also add missing fcs, lcs and winhighlight to list of key-value options for `vim.opt`.
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Javascript module files are not recoginzed.
Solution: Recognize "*.jsm" files as Javascript. (Brett Holman,
closes vim/vim#11069)
https://github.com/vim/vim/commit/bb6c4073e79e86ef69c315338e00c12f0d8d6395
|
| | |
| | |
| | |
| | |
| | |
| | | |
feat(treesitter): use weak tables when possible
Also add the defaulttable function to create a table whose values are created when a key is missing.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Doing so on `BufDelete` has issues:
- `BufDelete` is also fired for listed buffers that are made unlisted.
- `BufDelete` is not fired for unlisted buffers that are deleted.
This means that diagnostics will be lost for a buffer that becomes unlisted.
It also means that if an entry exists for an unlisted buffer, deleting that
buffer later will not remove its entry from the cache (and you may see "Invalid
buffer id" errors when using diagnostic functions if it was wiped).
Instead, remove a buffer from the cache if it is wiped out.
This means simply `:bd`ing a buffer will not clear its diagnostics now.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Added 'spell' option to extmarks:
Extmarks with this set will have the region spellchecked.
- Added 'noplainbuffer' option to 'spelloptions':
This is used to tell Neovim not to spellcheck the buffer. The old
behaviour was to spell check the whole buffer unless :syntax was set.
- Added spelling support to the treesitter highlighter:
@spell captures in highlights.scm are used to define regions which
should be spell checked.
- Added support for navigating spell errors for extmarks:
Works for both ephemeral and static extmarks
- Added '_on_spell_nav' callback for decoration providers:
Since ephemeral callbacks are only drawn for the visible screen,
providers must implement this callback to instruct Neovim which
regions in the buffer need can be spell checked.
The callback takes a start position and an end position.
Note: this callback is subject to change hence the _ prefix.
- Added spell captures for built-in support languages
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
|
| |\ \
| | |/
| |/| |
fix(api)!: correctly deal with number before :tab
|
| | |
| | |
| | |
| | |
| | |
| | | |
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which
is the same as the number passed before :tab modifier instead of the
number plus 1, and "tab" value is -1 if :tab modifier is not used.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add vim.treesitter.start() for starting treesitter highlighting via
ftplugin or autocommand (can be extended later for fold, indent,
matchpairs, ...)
* Add vim.treesitter.stop() for manually stopping treesitter
highlighting
* Enable treesitter highlighting for Lua if
`vim.g.ts_highlight_lua = true` is set in `init.lua`
|
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| | |
Problem: Filetype of *.sil files not well detected.
Solution: Inspect the file contents to guess the filetype.
https://github.com/vim/vim/commit/be807d582499acbe314ead3891481cba6ca136df
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* vim-patch:9.0.0314: VDM files are not recognized
Problem: VDM files are not recognized.
Solution: Add patterns for VDM files. (Alessandro Pezzoni, closes vim/vim#11004)
https://github.com/vim/vim/commit/bf26941f40923d331169a4ecb7341608f5d1ca38
* vim-patch:9.0.0319: Godot shader files are not recognized
Problem: Godot shader files are not recognized.
Solution: Add patterns for "gdshader". (Maxim Kim, closes vim/vim#11006)
https://github.com/vim/vim/commit/d5c8f11905abc1bdf3b8864dbc40187855ed9374
|
| |
| |
| | |
Follow up to https://github.com/neovim/neovim/pull/19916
|
| |
| |
| | |
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
| | |
|
| |
| |
| |
| | |
Makes the previously inner functions re-usable for a TCP client
|
| |
| |
| |
| |
| | |
To prepare for different transports like TCP where the handle won't have
a kill method.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Util from the nvim-treesitter project.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This removes the support for defining links via
vim.treesitter.highlighter.hl_map (never documented, but plugins did
anyway), or the uppercase-only `@FooGroup.Bar` to `FooGroup` rule.
The fallback is now strictly `@foo.bar.lang` to `@foo.bar` to `@foo`,
and casing is irrelevant (as it already was outside of treesitter)
For compatibility, define default links to builting syntax groups
as defined by pre-existing color schemes
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The private 'get_node_range' function from the languagetree module has
been renamed and remains private as it serve a purpose that is only
relevant inside the languagetree module.
The 'get_node_range' upstreamed from nvim-treesitter in the treesitter
module has been made public as it is in itself a utlity function.
|
| |
| |
| |
| | |
Util from the nvim-treesitter project.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
As part of the upstream of utility functions from nvim-treesitter, this
option when set to false allows to return a table (downstream behavior).
Effectively making the switch from the downstream to the upstream
function much easier.
|
| |
| |
| |
| |
| | |
Util from the nvim-treesitter project.
Renamed is_parent to is_ancestor for clarity.
|
| |\
| | |
| | | |
feat(treesitter): allow customizing language symbol name
|
| | | |
|
| |/
| |
| | |
A lua keyword is not a valid table identifier
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
fix(filetype): only pass first 100 and last lines to contents check
sufficient for current content checks and avoids performance issues for
buffers with a large number of lines
fixes #19817
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This starts a soft phase-out of `buf_request`.
`buf_request` is quite error prone:
- Positional `params` depend on the client because of the
`offset_encoding`. Currently if there is one client using UTF-8 offset
encoding and another using UTF-16, the positions in the request are
wrong for one of the clients. To solve this the params would need to
be created per client instead of once for all of them.
- `handler` is called *per* client but many users of it assume it is
only called once.
This can lead to a "select n + 1"
kind of problem, where the handler makes another call to `buf_request`,
multiplying the amount of requests.
(There are in fact still some places where this happens in core)
Or it leads to erratic behavior if called multiple times (E.g. the
quicklist list flickering & being overwritten)
(See hover or references implementation)
`buf_request_all` returns an aggregate of the responses which is more
sensible as it avoids this problem.
For off-spec extensions it also has the problem that it sends requests to
clients which cannot handle a given request.
Given that `buf_request` is in use by a lot of plugins this starts a
soft-phase out. Planned Steps:
- Remove from docs
- Provide an alternative, either `buf_request_all`, maybe with
extensions (params being a function), or an entirely new method.
- Mark as deprecated in 0.9
- Remove in 0.10
To note:
- `buf_request_all` currently isn't ideal either because it suffers from
the `params` problem as well.
- This implies that the `vim.lsp.with` pattern will die, because the
global handlers as they are don't fit a multi-client model, as most of
the time an aggregate is needed.
|
|
|
|
| |
This makes it easier to find documentation about the on-list-handler
when starting the search term with "lsp".
|
| |
|
|
|
|
|
| |
Problem: Astro files are not detected.
Solution: Add a pattern to match Astro files. (Emilia Zapata, closes vim/vim#10904)
https://github.com/vim/vim/commit/6a76e84f555da6d9ee57db80143e1e5eb85535ff
|
|
|
|
|
| |
Problem: Metafun files are not recogized.
Solution: Add filetype detection patterns.
https://github.com/vim/vim/commit/9032b9ceb6073288d75386dbcbd9d1982fa24080
|
|
|
|
|
|
|
|
| |
`server_capabilities` can be nil until the server is initialized.
Reproduced with:
vim.lsp.stop_client(vim.lsp.start_client {
cmd = { vim.v.progpath, '-es', '-u', 'NONE', '--headless' };
})
|