Commit graph

770 commits

Author SHA1 Message Date
Steven Arcangeli
daeee77f39 fix: refactor deprecated methods in neovim 0.10 2024-04-23 07:20:39 -07:00
brunnseb
7045e7cb00
feat(tsx): treesitter support for JSX symbols (#365)
Co-authored-by: Sebastian <sebastian.brunner@ti8m.ch>
2024-04-19 10:56:26 -04:00
Markus Koller
218eae4cb7
fix(lualine): use sep_icon in dense mode as well (#360) 2024-04-17 10:17:02 -04:00
github-actions[bot]
399e276328
chore(master): release 1.6.0 (#349)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-16 16:36:05 -04:00
Micah Halter
2f1b8979d2
fix(julia): treesitter queries changed upstream (#362)
* fix(julia): treesitter queries changed upstream

* fix(julia): for fully qualified functions show entire expression

* fix(julia): fix short function definitions

* fix(julia): show all of the function definition expression because just the name is useless with multiple dispatch

* fix(julia): update tests to match new function symbol names
2024-04-16 16:30:37 -04:00
Github Actions
b6697d8d65 [docgen] Update docs
skip-checks: true
2024-04-16 20:27:50 +00:00
Gordon Cassie
5961a1afc0
feat(zig): basic treesitter support for zig. (#359)
* Add basic support for navigating zig files.

* Fix struct start position.

* Add test and tagged unions.

* Add test.
2024-04-16 16:27:37 -04: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
Github Actions
219dca2145 [docgen] Update docs
skip-checks: true
2024-03-24 03:11:07 +00: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
emmanueltouzery
c8a40b1266
feat(treesitter): groovy support (#351) 2024-03-11 16:29:45 -07:00
Github Actions
31fbd369bb [docgen] Update docs
skip-checks: true
2024-03-02 23:24:03 +00: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
8da95fd05b test: revert fix objdump tests
Now tests are failing the other way? It's unclear what's going wrong.
2024-03-01 14:16:39 -08:00
Steven Arcangeli
6f1d2d5d86 test: fix objdump tests 2024-03-01 14:02:40 -08:00
Steven Arcangeli
320a883b0b cleanup: remove backwards compatibility shim 2024-03-01 13:45:14 -08:00
github-actions[bot]
3748e87a31
chore(master): release 1.5.0 (#343)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-05 08:00:51 -08:00
Steven Arcangeli
d21482d3be fix(javascript): treesitter queries changed upstream 2024-02-02 16:21:39 -08:00
toh995
9523ebc7f0
feat(telescope): Save position into jumplist before 'edit' action (#340) 2024-02-02 16:13:18 -08:00
github-actions[bot]
e9661d4f73
chore(master): release 1.4.0 (#304)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-21 15:46:50 -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
b730cd8eba ci: github workflow automation 2024-01-14 12:46:22 -08:00
231tr0n
ce9f397d04
fix: remove extra double quotes for fzf prompt (#339) 2024-01-14 09:32:39 -08:00
Steven Arcangeli
e2e3bc2df4 fix: Neovim closes on bdelete (#333) 2023-12-24 02:51:10 +00:00
emmanueltouzery
ef08437108
fix(vim treesitter): support functions with field expression names (#332) 2023-12-07 20:53:35 -08:00
Steven Arcangeli
ef81ab9184 chore: feature request template and add severity to bug report template 2023-12-05 17:35:20 -08: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
Github Actions
3b89343711 [docgen] Update docs
skip-checks: true
2023-11-10 15:39:53 +00: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
Slotos
21e3358617
chores: update markdown expectations, regenerate ruby symbols, enable nvim-treesitter main testing (#323)
* chore: Fix markdown tests

Recent update to nvim-treesitter breaks aerial.nvim tests.
Specifically:
- nvim-treesitter/nvim-treesitter@96f55f3043
- MDeiml/tree-sitter-markdown@cd705f1591

Manually poking around, the behaviour remains the same

* chore: Regenerate ruby symbol snapshots

Prior version held a bunch of data written by hand. This commit updates
it to avoid false alarms when generating symbols for new or updated
queries.

Expectations are not changed, only the order of keys in individual
tables was updated.

* chore: Option to run tests on nvim-treesitter main

While nvim-treesitter is not a strict requirement for aerial.nvim, it
is used to install parsers and it updates nvim default language to
parser assignments with practical values. This commit adds an ability to
run tests against `main` branch by providing `--test-main` option to
`run_tests.sh`.

* chore: Add neorg parser config to main branch

Use C++14 compatible compiler when running tests with `--test-main`,
otherwise parser compilation will fail.
2023-11-09 21:17:09 -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
Colin Kennedy
eb301a4763
feat(treesitter): support for objdump files (#320)
* Added aerial queries for objdump

Added objdump to minimal_init.lua

* ci: tests fail if changes to snapshot files

* cleanup: comments on test filetype special cases

* test: add objdump test snapshots

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2023-10-31 07:55:51 -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
Github Actions
88247a5666 [docgen] Update docs
skip-checks: true
2023-10-17 14:58:27 +00:00
Ryan Dale
c306ffcf34
feat(treesitter): support for snakemake (#316)
* add snakemake, based off of python

* add snakemake test file

* add example (but currently incorrect) test file

* fix tests
2023-10-17 07:58:08 -07:00
Steven Arcangeli
ffdda791c0 test: add update_snapshots make target 2023-10-16 14:54:28 -07:00
Steven Arcangeli
7767d8324c test: better error message when no backend is present 2023-10-16 14:49:33 -07:00
Steven Arcangeli
34b820d627 test: include scope field in snapshot tests 2023-10-16 10:01:42 -07:00
Steven Arcangeli
5b0433d61f
test: refactor tests to use snapshot files (#315)
* test: change treesitter tests to use snapshots

* test: add selection_range to treesitter tests

* ci: run tests against neovim 0.9.4
2023-10-15 21:18:56 -07:00
Steven Arcangeli
340d0197d7 fix(cpp): add support for declared functions (#314) 2023-10-15 17:58:21 -07:00
Steven Arcangeli
f10d29edb4 doc: format code blocks in README 2023-10-15 17:58:21 -07:00