Santos Gallegos
1f303c7f3c
goto_node: normalize range for nvim_win_set_cursor
...
Looks like neovim doesn't accept -1 on nvim_win_set_cursor.
It's listed as an exception on `:h api-indexing`.
Fixes https://github.com/nvim-treesitter/nvim-treesitter-textobjects/issues/149
2021-12-20 15:12:12 +01:00
Omer Tuchfeld
3b05ef4492
Add support for new golang go.work files
...
The new golang 1.18 version (currently in beta) [introduced](https://github.com/golang/go/issues/45713 ) a new file type
called `go.work`.
This commit adds support for the syntax of that file using the https://github.com/omertuc/tree-sitter-go-work repository
That repository is heavily based on previous work in the https://github.com/camdencheek/tree-sitter-go-mod repository, with a few
minor changes to make it work on the very similar `go.work` files.
2021-12-18 20:02:08 +01:00
Stephan Seitz
f88e16ce0d
feat: enable parsers after installation immediately without reload
2021-12-15 18:50:54 +01:00
Stephan Seitz
387a8f38bd
parsers: Add MDeiml/tree-sitter-markdown as markdown parser
...
Fixes #872
2021-12-14 15:00:14 +01:00
Lewis Russell
567c644e53
feat(lang): add make
2021-12-14 14:59:38 +01:00
Chad Condon
0004d7552f
Apply cpp to arduino
2021-12-06 21:16:27 +01:00
Stefan Wienert
dec2ba27a8
Feat: Added Pug parser with inital queries
2021-11-30 23:40:49 +01:00
oxalica
6407d54092
fix: off-by-one errors in indent calculation
2021-11-28 14:52:06 +01:00
elianiva
b2801abc21
refactor(prisma): switch to alternative repo
...
Co-authored-by: richin13 <richin13@gmail.com>
2021-11-28 00:36:24 +01:00
elianiva
3da2ab9857
feat: add prisma support
2021-11-28 00:36:24 +01:00
patrick96
d2174f1d29
Fix docs
2021-11-28 00:31:02 +01:00
patrick96
d24a1c63d4
Make disable accept a function
...
Replaces the condition setting (though it does the exact inverse)
2021-11-28 00:31:02 +01:00
patrick96
76673d61c3
Rename cond to condition
2021-11-28 00:31:02 +01:00
Stephan Seitz
3fd8bbd3d8
parsers(fusion): add .git suffix necessary for Gitlab projects
2021-11-26 22:42:55 +01:00
Stephan Seitz
61b21254ee
parsers(fusion): add info about main branch
2021-11-26 22:04:59 +01:00
Jirgn
a14e48ea8a
fix: mark support experimental
2021-11-26 22:04:59 +01:00
Jirgn
979c32493d
feat: add fusion grammar and highlights
2021-11-26 22:04:59 +01:00
Stephan Seitz
b2af0d3df4
parsers: godotResource -> godot_resource
...
Follows upstream renaming
2021-11-25 22:29:42 +01:00
Greg Werbin
1f68918e09
Don't use the Bash grammar for Zsh files
...
Zsh and Bash are not interchangeable.
See <https://github.com/nvim-treesitter/nvim-treesitter/issues/655#issuecomment-978036615 >
2021-11-24 18:09:49 +01:00
Santos Gallegos
1e5e028cb7
Format with stylua
...
CI is failing for stylua due to this.
2021-11-18 09:26:01 +01:00
gegoune
bb0ef18488
refactor: inherit json
2021-11-12 21:52:50 +01:00
gegoune
a93c5b80d7
feat: add http parser
...
All credit goes to @NTBBloodbath.
See: https://github.com/NTBBloodbath/rest.nvim/issues/75#issuecomment-960447966
Co-authored-by: NTBBloodbath <bloodbathalchemist@protonmail.com>
2021-11-12 21:52:50 +01:00
Fabian David Schmidt
fba03a304e
feat: get node at cursor of other win
2021-11-12 20:56:09 +01:00
patrick96
e3dabec462
Add condition function to module config
...
The function is called with the language and bufnr, if it returns false,
the module is disabled for that buffer.
This gives the user more fine-grained control over whether a module is
started.
2021-11-12 19:55:04 +01:00
Robert Jackson
da5920f2bf
Ensure ft_to_lang supports multipart filetypes.
...
This allows a given parser to directly implement a multipart filetype
(like `glimmer` parser does for `html.handlebars`).
If an exact match for the current filetype is found in the lookup table,
it will be used; otherwise we look for just the first segment.
2021-11-11 21:11:15 -05:00
Robert Jackson
89b3b77033
Add html.handlebars as a valid type for the glimmer parser.
...
This filetype is in common use due to https://github.com/mustache/vim-mustache-handlebars/blob/master/ftdetect/handlebars.vim#L2
2021-11-11 21:11:15 -05:00
Sirisak Lueangsaksri
f6dcbe66b0
refactor: nitpicking
2021-11-08 15:04:38 +01:00
Sirisak Lueangsaksri
aaf157a6a9
feat: sync install for ensure_installed
2021-11-08 15:04:38 +01:00
Dundar Göc
6a4fdb317d
chore: fix typos
2021-11-02 23:47:48 +01:00
Stephan Seitz
05380d700b
Fix typo in locals.lua: vaild -> valid
2021-11-01 14:52:21 +01:00
Stephan Seitz
82afae9c9c
Fix bugs in TSRange
...
- TSRange:new() was missing to extract the line from nvim_buf_get_lines
- TSRange:parent() was only working when current buf == self.buf
2021-11-01 14:51:53 +01:00
Santos Gallegos
55860a76d9
Use wrapper around vim.notify with common options
...
Ref https://github.com/nvim-treesitter/nvim-treesitter/pull/1927#issuecomment-947064843
2021-10-22 23:46:16 +02:00
maxxnino
e3e43c479e
Add zig as compiler for parser
2021-10-21 22:10:55 +02:00
Santos Gallegos
04db2e8295
Use vim.notify instead of print in some places ( #1927 )
2021-10-19 12:01:20 -05:00
Connor Lay (Clay)
1676efb9b7
Switch to official elixir-lang parser
2021-10-13 01:31:49 +02: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
Stevan Milic
ea0f6614b7
Add scala maintainer
...
Add fold for scala val definition to support type class entries
2021-10-07 23:24:45 +02:00
Cezary Drożak
c2c454c29a
parsers: add D parser
2021-10-07 22:43:09 +02:00
Cezary Drożak
e87ed0fdaa
feat: add "experimental" key to parsers
...
feat(ci): mark parsers as experimental in README
2021-10-07 22:43:09 +02:00
Benjamin Graham
6f2b1abd17
Added branch specification
2021-10-03 18:40:25 +02:00
Benjamin Graham
6188437150
LLVM parser/highlighter added
2021-10-03 18:40:25 +02:00
Stephan Seitz
98ada316c3
chore: use vim.ui.select for TSEditQuery if available
2021-10-03 11:17:40 +02:00
Stephan Seitz
44d4d07dbf
chore: print compiler version in healthcheck
2021-10-03 11:06:57 +02:00
Stephan Seitz
2a073f760c
feat(install): add options prefer_git and command_extra_args
...
Fixes #1888
2021-10-01 22:21:16 +02:00
Santos Gallegos
e4c56e691a
Use vim-range style (1-index based) when possible ( #1841 )
...
https://github.com/nvim-treesitter/nvim-treesitter/pull/1829
half fixed incremental selection for the vim parser,
but other bugs still remain (infinite selection and skip selecting the
root node).
Problems can be replicated with these two files:
(missing selecting the root node)
```vim
set scrolloff=7
set scrolloff=7
```
(infinite loop)
```vim
set scrolloff=7
```
The main problem is that we try to map
the current selection range to a TS range,
but the TS range of a node could include the EOL/EOL marks
so it's impossible to know when to change the vim range
to match the TS range, is more easy to transform the
TS range to a vim range and do the comparison.
2021-09-24 17:46:44 -05:00
Lucas Crownover
da4488c08b
Swapping to the correct repo
2021-09-21 01:08:32 +02:00
Lucas Crownover
c99389fcf5
Adding perl parser
2021-09-21 01:08:32 +02:00
Santos Gallegos
3aa122edfd
Fix incremental selection for nodes that include EOL
...
From `:h setpos()`
> If "col" is smaller than 1 then 1 is used.
This can be tested with incremental selection on a vim file.
```vim
set title
```
2021-09-19 14:54:45 +02:00
kghugo
d5e87dde10
Support hjson
2021-09-19 14:19:20 +02:00
Stephan Seitz
dea66fb4ce
parsers: add glsl parser
2021-09-17 20:52:13 +02:00