aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/health.lua
Commit message (Collapse)AuthorAge
* fix(health): better layout of vim.treesitter health checkChristian Clason2024-11-02
| | | | | | | | Problem: Long lists of available parsers make it hard to see WASM status. Solution: Add separate headings for "treesitter features" (ABI, WASM) and "treesitter parsers". Also add minimum supported ABI version.
* feat(treesitter): add support for wasm parsersLewis Russell2024-08-26
| | | | | | | | | | | | | | | | | | | | Problem: Installing treesitter parser is hard (harder than climbing to heaven). Solution: Add optional support for wasm parsers with `wasmtime`. Notes: * Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and Neovim. Build with `make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON` * Adds optional Rust (obviously) and C11 dependencies. * Wasmtime comes with a lot of features that can negatively affect Neovim performance due to library and symbol table size. Make sure to build with minimal features and full LTO. * To reduce re-compilation times, install `sccache` and build with `RUSTC_WRAPPER=<path/to/sccache> make ...`
* fix(treesitter): text alignment in checkhealth vim.treesitterJongwook Choi2024-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: The column width 10 for parser name (lang) is too short. For example, `markdown_inline` has 15 characters, which results in a slight misalignment with other lines. e.g. it looked like: ``` - OK Parser: markdown ABI: 14, path: .../parser/markdown.so - OK Parser: markdown_inline ABI: 14, path: .../parser/markdown_inline.so - OK Parser: php ABI: 14, path: .../parser/php.so ``` Solution: Use column width 20. As of now, the longest name among those available in nvim-treesitter has length 18 (`haskell_persistent`). e.g.: ``` - OK Parser: markdown ABI: 14, path: .../parser/markdown.so - OK Parser: markdown_inline ABI: 14, path: .../parser/markdown_inline.so - OK Parser: php ABI: 14, path: .../parser/php.so ```
* refactor: create function for deferred loadingdundargoc2024-02-03
| | | | | | | | | | | | | | | | The benefit of this is that users only pay for what they use. If e.g. only `vim.lsp.buf_get_clients()` is called then they don't need to load all modules under `vim.lsp` which could lead to significant startuptime saving. Also `vim.lsp.module` is a bit nicer to user compared to `require("vim.lsp.module")`. This isn't used for some nested modules such as `filetype` as it breaks tests with error messages such as "attempt to index field 'detect'". It's not entirely certain the reason for this, but it is likely it is due to filetype being precompiled which would imply deferred loading isn't needed for performance reasons.
* refactor: deprecate checkhealth functionsdundargoc2023-04-15
| | | | | | | | | | | | | | | | | | | | | | | The following functions are deprecated and will be removed in Nvim v0.11: - health#report_start() - health#report_info() - health#report_ok() - health#report_warn() - health#report_error() - vim.health.report_start() - vim.health.report_info() - vim.health.report_ok() - vim.health.report_warn() - vim.health.report_error() Users should instead use these: - vim.health.start() - vim.health.info() - vim.health.ok() - vim.health.warn() - vim.health.error()
* fix(health): stop using deprecated ts.language.inspect_language() (#22850)Sizhe Zhao2023-04-01
|
* fix(treesitter): fixup for healthLewis Russell2023-02-27
|
* feat(treesitter): add filetype -> lang APILewis Russell2023-02-21
| | | | | | | | | | | | | | | | | | 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.
* feat(checkhealth): check runtime ($VIMRUNTIME)Justin M. Keyes2022-10-30
| | | | | | Move man/health.lua into the "runtime" check. fix #20696
* feat(checkhealth): improve treesitter reportJustin M. Keyes2022-10-30
|
* docs(treesitter): clean up and update treesitter.txt (#20142)Christian Clason2022-09-14
| | | | | * add type annotations to code * clean up and expand static documentation * consistent use of tags for static and generated docs
* refactor(lua): reformat with stylua 0.14.0 (#19264)Christian Clason2022-07-07
| | | | * reformat Lua runtime to make lint CI pass * reduce max line length to 100
* chore: format runtime with styluaChristian Clason2022-05-09
|
* fix(healthcheck): update builtins to the new convention #15914Javier Lopez2021-10-05
| | | Adjust some builtin healthchecks to use Lua, after #15259
* docs: Treesitter (#13260)TJ DeVries2021-05-01
| | | | | | | | | * doc & fixes: Generate treesitter docs * fixup to treesitter-core * docs(treesitter): fix docs for most functions Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* fix(ts): move checkhealth in runtime/vimThomas Vigouroux2021-04-06