Commit graph

45 commits

Author SHA1 Message Date
Christian Clason
d740b0ad92 docs(readme): mark Nvim 0.10 as required 2024-10-25 08:48:16 +02:00
Christian Clason
59d4c14a1a feat!: bump minimum Nvim version to 0.9.2
required for empty injection fix
2024-01-15 13:02:20 +01:00
Christian Clason
2aa9e9b0e6 feat!: bump required Nvim version to 0.9.1 2023-08-12 17:34:15 +02:00
dundargoc
21f2fb188e fix(checkhealth): use non-deprecated versions if possible 2023-04-16 05:26:14 -07:00
Lewis Russell
90ead4ed58 fix: shim 0.9 deprecations 2023-03-24 16:05:38 +01:00
kylo252
1f087c91f5
fix(health): check required neovim version (#4330)
* fix(health): check required neovim version

* fixup(health)!: require v0.8.3 for is_in_node_range

* fixup(readme)!: always prefer latest neovim
2023-03-24 03:36:30 +01:00
dundargoc
87dd482e1a fix(health): align the list of parsers when doing checkhealth
Some parser names are too long for the given space, which shifts the
features so they aren't in line.
2022-12-21 13:08:15 +01:00
Stephan Seitz
5aacb06135 chore: print OS version on health report
Often we get issue report without knowing which version of Windows or
Linux or MacOS they are running.
2022-11-26 18:38:49 +01:00
Stephan Seitz
fbf453a432 chore: trim space in check-health
Fixes #3248
2022-08-03 18:45:37 +02:00
Christian Clason
b922b2c3db fix(health): update to upstream changes
The `health` module was moved to `vim.health` in https://github.com/neovim/neovim/pull/18720
2022-06-02 12:56:57 +02:00
Christian Clason
07eb437bb1 refactor!: update to Neovim 0.7 APIs
* set highlight groups via nvim_set_hl
* define autocommands via nvim_create_autocmd
* port plugin/nvim-treesitter.vim to Lua
* port healthcheck to Lua
2022-04-30 16:08:01 +02:00
Christian Clason
a189323454 chore: bump minimal Nvim version to 0.7 and check
Checks minimal version in `:checkhealth nvim-treesitter`

Also recommend nightlies
2022-04-16 11:13:32 +02:00
Stephan Seitz
7049a66b54 health: check which file caused an error 2022-01-29 23:45:32 +01:00
Christian Clason
bb319daf5f feat: specify abi version for generate on newer ts cli
Check tree-sitter CLI version and if > 0.20.3 and generating a parser
from grammar, use `--abi=vim.treesitter.language_version`.

Besides being able to opt-in to newer ABI benefits, this is a necessary
workaround for an upstream bug with 0.20.3, where `parser.h` is not
generated if the (optional) `--abi` flag is omitted.
2022-01-22 22:56:50 +01:00
Javier López
66f1873213 feat(healthcheck): support native lua healthchecks, and fixes
After neovim/neovim#15259 lua healthchecks are called directly and are
prefered over neovim autoload ones. The discover of Lua ones requires
the function to be named "check()".

Also the mentioned PR changed the design of healthchecks to not use
output capturing, therefore avoid printing and instead concatenate and
call the health functions.
2021-10-11 09:47:16 +02:00
Stephan Seitz
44d4d07dbf chore: print compiler version in healthcheck 2021-10-03 11:06:57 +02:00
Santos Gallegos
bd3363e01d Checkhealth: include injections
Fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1459
2021-07-05 12:34:47 +02:00
Santos Gallegos
be8f656087
Use stylua for autoformat code (#1480) 2021-07-04 21:12:17 +00:00
Stephan Seitz
ee2266993b Fix 1359: nil check for version in health-check 2021-06-04 07:46:11 +02:00
Stephan Seitz
bf0ae40cf4 fix(health): let CC check behave like in real installation
Fixes #1146
2021-04-07 13:00:42 +02:00
Stephan Seitz
052590ae55 healthcheck: raise error when ABI is too old 2021-04-02 06:05:56 +02:00
Stephan Seitz
c16a6c972b Check for node-js on :TSInstallFromGrammar
Ref: https://github.com/nvim-treesitter/nvim-treesitter/issues/1121#issuecomment-811755767
2021-04-01 21:10:47 +02:00
Stephan Seitz
edd942a962 Add tree-sitter ABI version to health check 2021-03-31 19:01:21 +02:00
Stephan Seitz
1375cc5c1f fix(checkhealth): display error messages of failed queries 2021-03-23 21:25:37 +01:00
bitcoder
b84dbcc66c use health#report_warn for treesitter version check 2021-03-22 12:40:43 +01:00
nbCloud91
5c00f8ede1 fix formatting issues caused by asterisk
Replace the asterisk used for "Multiple parsers found" by a plus sign. It prevents the asterisk from messing up the formatting of the rest of the `:checkhealth` buffer.
2021-03-18 07:09:31 +01:00
BonaBeavis
f652e1efed Use newline instead of space 2021-03-17 20:21:50 +01:00
BonaBeavis
2bbc1a2d59 Add newline before legend
Without this newline there is no syntax highlighting after the legend.
2021-03-17 20:21:50 +01:00
bitcoder
ec41db9511 update tips in healthcheck 2021-03-09 00:45:50 +01:00
bitcoder
7760f08658 add treesitter version in checkhealth 2021-03-09 00:45:50 +01:00
kiyan
9d57216c0d chore: remove useless code and indent files 2021-02-27 13:36:33 +01:00
kiyan
9e5fb44f84 health: add legend for x icon in query health 2021-02-22 23:32:11 +01:00
kiyan
dbe5441918 chore: rewrite healthcheck for compact output 2021-02-22 23:32:11 +01:00
Stephan Seitz
8c10b1a14d fix(checkhealth): use pcall to check for syntax errors in query files 2020-09-20 10:37:06 +02:00
Thomas Vigouroux
34160bb6f2 fix(health): only check installed parsers
This is to avoid awfully long checkhealths. And not installed parsers
can be infered from the fact that they are not listed.
2020-08-27 21:39:11 +02:00
Stephan Seitz
31d1f068fd checkhealth for all query groups 2020-07-15 16:28:48 +02:00
Stephan Seitz
5642507f6a Make luacheck happy 2020-07-05 19:21:06 +02:00
kiyan42
df17a48c85 refactor: parser list and lang->ft/ft->lang
- move parser list in `parsers.lua`
- most `ft` variable where changed to `lang`, `ft` is only used on
  autocmd binding, and lang is used for everything else. Functions have
  been defined to make the switch between `ft` and `lang`
2020-06-20 12:31:52 +02:00
Stephan Seitz
3b3a692e2c Remove postspaces and avoid one global 2020-05-22 17:07:28 +02:00
kiyan42
45dcebb15f refacto/feat: better handling of parser updates
features:
- node_movement is moving between scopes.
- add selection initialization from normal mode
- add a decremental selection

improvements:
- attach to buffer to run tree parsing on change
- run state update on CursorMoved
- the buffer state is:
```
{
  cursor_pos = { row=row, col=col },
  current_node = node_under_cursor,
  selection = {
      range = nil, -- activates when starting a selection
      nodes = {} -- filling up when starting an incremental selection
  },
  parser = parser, -- parser for current buffer
}
```
- refacto all the modules reliant on parsing the tree, update the current nodes, get the current nodes...

fixes:
- fix has_parser to look for .so libraries
- fix should select the whole file when selection root in selection
2020-05-12 16:16:48 +02:00
Thomas Vigouroux
ce690e550d health(refactor): move checks inside health.lua 2020-04-26 15:38:32 +02:00
Thomas Vigouroux
4d4e7d8a8c health: add highlight to healthchecks 2020-04-26 09:29:52 +02:00
kiyan42
62786ec7c6 feat/refacto: improve configurations
- You should now get the configs through functions
- Configs for languages are now inside a local object called parsers
- You can get the parser installation configurations with `get_parser_configs`
- A new object has been initialized inside configs to specify module config (called config).
- Provide functions to enable/disable a module on one buffer
- Provide functions to enable/disable a module on all buffers, and if filetype is
  specified, for specific filetype
- Provide function to determine if module is activated for a specified filetype
2020-04-24 22:15:21 +02:00
kiyan42
62ce7744db feat/refacto: add configs.lua, setup install
- configs.lua holds the `repositories` data
- install health moved to health.lua
- plugins loads _root.setup() on startup
- install and list command are available through vim
> use them with `:TSInstall lang` and `:TSInstallInfo`
2020-04-21 23:40:23 +02:00
kiyan42
698453e50c feat: add checkhealth 2020-04-21 13:38:16 +02:00