Commit graph

480 commits

Author SHA1 Message Date
Steven Arcangeli
f6f74a04ba fix: nav view doesn't force cursor to col 0 (#403) 2024-09-11 09:10:07 -07:00
ergou
3c04b040a8
fix(treesitter): explicitly set all to false in iter_matches (#407)
* feat: explicitly set all to false in iter_matches

Due to neovim's breaking change for treesitter, in nightly build the
option all is set to true by default

* feat: use nil value to make iter_matches use default
2024-09-10 10:25:32 -07:00
Steven Arcangeli
491e2fc564 fix(zig): update queries for new zig treesitter parser 2024-08-30 09:31:32 -07:00
Qiu Yu
e585934fef
feat(starlark): treesitter support for Starlark (#402) 2024-08-21 20:40:59 -07:00
Micah Halter
b092d6373d
fix: warning when closing buffers with the LSP backend in place (#397)
* perf: remove unnecessary check for no `bufnr` as it's already checked a few commits prior

* fix(lsp): remove unnecessary warning in `fetch_symbols`. Fixes #393

* fix: restore buffer defaults

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2024-08-10 13:33:08 -07:00
Micah Halter
3d910b2ba0
feat: add support for mini.icons (#383) 2024-07-15 16:09:29 -07:00
Steven Arcangeli
b309d0df6b
refactor!: drop support for Neovim 0.8 (#387) 2024-07-15 11:31:20 -07:00
reverendpaco
db0af491ff
feat: highlight parent symbol in Nav UI (#380)
* feat: added a highlight group for the left-hand side of the Nav float ui to indicate the parent of the current symbol

* feature tweak: made sure to force focus on the left-hand side if the list on the left-hand side is super long

* format: apply stylua

* fix: restore AerialVariableIcon hl group

* refactor: use full-line highlighting in nvim 0.10

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-07-01 12:15:05 -07:00
DragonBillow
eb25396dae
feat: support loongdoc with asciidoc backend (#377) 2024-06-17 10:25:33 -04:00
Steven Arcangeli
690290be7f ci: use nvim-typecheck-action v2 2024-06-01 19:26:10 -07:00
Steven Arcangeli
bd5f141a54 doc: better type annotations for API methods 2024-05-21 21:25:02 -07:00
Steven Arcangeli
9e725f0810 ci: run tests against Neovim v0.10.0 2024-05-16 11:43:00 -07:00
Steven Arcangeli
228fad1139 fix: attach_mode="global" never allows multiple windows to open (#369)
There was an edge case with "ignored" window types that would cause
`:AerialOpen` in an ignored window to potentially open a second aerial
win.
2024-05-07 16:55:13 -07:00
Steven Arcangeli
daeee77f39 fix: refactor deprecated methods in neovim 0.10 2024-04-23 07:20:39 -07:00
Linus Boehm
24ebacab58
fix: check if bufdata.last_win != nil (#356)
When opening nvim in diffview (`nvim -c DiffviewOpen`) and then toggeling aerial,
aerial errors when trying to call `vim.api.nvim_win_is_valid(bufdata.last_win)`
as bufdata.last_win == nil. This change adds a check and returns in case of a nil
value.

Co-authored-by: Linus Boehm <linusboehm@gmail.com>
2024-03-27 20:26:39 -07:00
Steven Arcangeli
51a07949ab fix: can open aerial in ignored windows (#352) 2024-03-23 20:39:36 -07:00
Linus Boehm
bdc94c5387
feat: option to enable earial in diff windows (#355)
resolves #354

Co-authored-by: Linus Boehm <linusboehm@gmail.com>
2024-03-23 20:10:54 -07:00
Steven Arcangeli
993142d492 fix: set lsp.diagnostics_trigger_update=false by default
Some LSP servers are less than consistent with pushing diagnostics. For
this and other reasons, I think tying the symbol refresh to diagnostics
is maybe not the best move. The first step I'm going to take is to make
the default behavior use a simple change listener, like the treesitter
backend. I may eventually deprecate and remove this behavior entirely.
2024-03-13 20:56:42 -07:00
DragonBillow
c45d5672c8
feat(backend): add asciidoc (#348)
* feat(backend): add asciidoc

Signed-off-by: DragonBillow <DragonBillow@outlook.com>

* test(asciidoc): add test for asciidoc

Signed-off-by: DragonBillow <DragonBillow@outlook.com>

* fix: move asciidoc test into separate file

* fix(asciidoc): remove call to treesitter extensions

* test(asciidoc): update asciidoc test

Signed-off-by: DragonBillow <DragonBillow@outlook.com>

* feat(asciidoc): check title like text in block

Signed-off-by: DragonBillow <DragonBillow@outlook.com>

* test: fix symbols files

---------

Signed-off-by: DragonBillow <DragonBillow@outlook.com>
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-03-02 15:23:47 -08:00
Steven Arcangeli
320a883b0b cleanup: remove backwards compatibility shim 2024-03-01 13:45:14 -08:00
Steven Arcangeli
cf69a43c08 fix: race condition when stopping loading timer (#331)
On Neovim 0.10, calling timer:stop() is not canceling the callback.
There appears to be some minimum amount of buffer time remaining in the
timer in order for it to be able to be canceled correctly. I'm getting
around this by adding a simple guard statement
2024-01-21 23:16:50 +00:00
Steven Arcangeli
8ccc18055b test: fix tests for upstream markdown treesitter change 2024-01-14 12:55:50 -08:00
Steven Arcangeli
e2e3bc2df4 fix: Neovim closes on bdelete (#333) 2023-12-24 02:51:10 +00:00
Steven Arcangeli
edfdcf1d45 fix: don't clear stored data when buffer is unlisted 2023-12-05 17:35:20 -08:00
Steven Arcangeli
88764566f9 fix: better error message for refetch_symbols (#328) 2023-11-24 14:22:09 -08:00
Steven Arcangeli
712802e731 fix: AerialLine highlight has highest priority (#329) 2023-11-23 23:36:53 -08:00
Steven Arcangeli
d82a994d66 fix: default highlights in Neovim 0.9
When we updated to using nvim_get_hl we didn't account for the fact that
the return value is a different format than nvim_get_hl_by_name.
2023-11-18 08:00:50 +00:00
Slotos
51bdd35f4f
feat: cache aerial tree-sitter queries (#325)
When moving away from nvim-treesitter helpers, I overlooked the caching
they were performing. This means that currently on every symbols
refetch, neovim scans filesystem and gets all queries. Definitely useful
when writing new queries, but slow nonetheless.

This commit introduces a simple query cache and an API method to clear
said cache. With this, performance should improve, yet a way to iterate
over query design remains accessible.
2023-11-11 18:21:17 -08:00
Slotos
2d169d3497
feat: set scope from node captures and add basic query documentation (#318)
* Process scope captures

This lets us avoid complex querying when extracting scope.
As long as the capture includes a scoping node in a `@scope` capture,
its text will be extracted and used as a scope value.
If "public" is named differently in some language,
`#set @scope "text" "public"` will do the trick for a cost of an
additional query.

* Add basic query documentation to readme and vimdoc

* Add reusable language extensions info to readme
2023-11-10 07:39:37 -08:00
Steven Arcangeli
8e4090bf94 feat: ship the experimental treesitter selection range (#279) 2023-10-31 17:26:09 -07:00
Steven Arcangeli
23a739c0ac refactor: rename @type capture to @symbol 2023-10-31 16:51:08 -07:00
Slotos
3a3baf0930
feat(treesitter): ruby queries can set the scope of methods (#317)
This has direct impact on highlighting. If scope is set and set to
anything but "public", highlighter will use a separate highlight for
the corresponding entry. This was previously used by Elixir extension
by manually processing nodes.

Ruby queries are updated to deal with both predicate and statement
versions of scope setting.
2023-10-19 21:35:32 -07:00
Slotos
b5d5f480a7
refactor: use built-in treesitter APIs and remove nvim-treesitter requirement (#294)
* Use vim.treesitter instead of nvim-treesitter helpers

0.10 compatible nvim-treesitter is removing a lot of code, since main
  functionality is readily available in the core neovim.
This commit extracts all calls to nvim-treesitter helpers in favor of
neovim core functions, own implementations, or clones of nvim-treesitter
functions. This aligns with nvim-treesitter `main` branch description of
being a parser installation helper and queries repository.

Co-Authored-By: Steven Arcangeli <stevearc@stevearc.com>
Co-Authored-By: Chen Shuaimin <chen_shuaimin@outlook.com>

* cleanup: remove unnecessary has_query helper

* refactor: replace get_at_path with more specific helper

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
Co-authored-by: Chen Shuaimin <chen_shuaimin@outlook.com>
2023-10-17 08:38:28 -07:00
Steven Arcangeli
340d0197d7 fix(cpp): add support for declared functions (#314) 2023-10-15 17:58:21 -07:00
pseudometa
5f6de33780
fix: delay when using q to close (#311)
* fix: delay when using `q` to close

* fix: remove delay on custom keymaps as well
2023-10-14 11:53:45 -07:00
Steven Arcangeli
6573d6ec21 fix: don't jump to top of buffer when autojump = true (#309) 2023-10-14 10:32:58 -07:00
Steven Arcangeli
483d2c860a fix: autoclose floating aerial win on leave 2023-10-13 09:21:37 -07:00
Folke Lemaitre
568780e7c1
fix(render): use EOL extmarks to render AerialLine (#302)
* fix(render): use EOL extmarks to render AerialLine (`rpad` is no longer needed)

* fix: remove unused variable and max_width calculation

* fix(render): set strict=false. Only happens when line is last in the buffer, and strict-false still shows it correctly

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2023-10-12 09:52:23 -07:00
Steven Arcangeli
da3041fd56 doc: fix documentation generation 2023-10-11 10:32:34 -07:00
Steven Arcangeli
847a2a31fb fix: queue commands before aerial attaches to avoid dropped inputs (#301) 2023-10-11 10:21:02 -07:00
Steven Arcangeli
c383f45ec0 fix: aerial ignores diff windows (#299) 2023-10-10 22:17:01 -07:00
Steven Arcangeli
c2ed3b98b2 format: auto sort requires 2023-10-08 23:32:22 -07:00
Steven Arcangeli
551a2b679f fix: silence errors from moving cursor (#297) 2023-09-28 18:57:44 -07:00
Steven Arcangeli
d7577c6bd4 fix: add guards for unloaded buffers (#296) 2023-09-27 08:27:18 -07:00
Steven Arcangeli
1175f79bdd fix: missing symbol on navigation shouldn't error (#295) 2023-09-22 15:31:27 -07:00
Slotos
a2368d1c4b
fix(ts): improve ruby handling of singletons and methods (#293)
Ruby allows us to do a lot of weird stuff, and having weirdness glaring
at us from the side panel can be handy for when we sober up and start
cleaning.

This commit handles a number of singleton class manipulation cases,
as well as adds a reciever information to singleton method declarations.
2023-09-18 10:40:21 -07:00
Don Perignom
9bcfbaf7a7
fix: add treesitter support for JS / TS / TSX generator functions (#289)
* fix: add JS as TS generator functions

* feat: add TSX generator functions
2023-09-15 06:36:17 -07:00
Steven Arcangeli
dc17cfd401 lint: fix typechecker errors 2023-08-25 17:08:25 -07:00
Steven Arcangeli
ffb5fd0aa7 fix: type annotations and type errors 2023-08-13 09:57:48 -07:00
Steven Arcangeli
e54cae0df0 feat: experimental support for navigating to symbol names (#279)
Using the treesitter backend, we can use the same "selectionRange" logic
that LSP symbol sources use to provide more detailed information about
where the name of the symbol is. We already use the LSP information to
change how we navigate the cursor to symbols, so once we parse this
information from treesitter it will automatically get used.

I'm putting this behind an experimental config option for now so we can
test it out for a while before making a sudden change to the behavior.
2023-08-09 21:47:48 -07:00