Commit graph

742 commits

Author SHA1 Message Date
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
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
b811243fdc
feat(telescope): only reverse results when sorting_strategy = "descending" (#307) 2023-10-13 09:04:46 -07:00
Folke Lemaitre
9ef83d9a7a
feat(lualine): added sep_icon option (#303) 2023-10-12 13:54:58 -07:00
github-actions[bot]
63ec2bfc3d
chore(master): release 1.3.0 (#288)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-12 09:58:04 -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
4462e73cd1 cleanup: remove unnecessary submodule 2023-10-11 10:31:16 -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
26e2a7c6bd ci: use stylua 0.18.2 2023-10-08 22:59:52 -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
Slotos
fa8c408b76
feat(ts): add ruby support for ruby operator methods (#292)
Ruby supports some operators overloading by declaring a method with the
operator as the method name, e.g. `def <=>(other)`. Tree sitter ruby
parser recognises these method names as operators, not identifiers, and
as such existing queries skip over them.

This commit adds a query that captures "operator" instance methods.
2023-09-18 08:22:59 -07:00
Steven Arcangeli
22ed2f75eb cleanup: don't need empty methods in resession extension 2023-09-17 10:07:18 -07:00
Don Perignom
bed048ddef
feat(ts): support for more solidity symbols (#290) 2023-09-16 10:08:41 -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
Kevin Ko
f34defe8f5
feat: add lualine separator highlight and optional prefix (#287) 2023-09-05 18:54:34 -07:00
Steven Arcangeli
fc04a097d0 ci: merge workflows and add makefile 2023-09-01 23:39:50 -07:00
Steven Arcangeli
dc17cfd401 lint: fix typechecker errors 2023-08-25 17:08:25 -07:00
github-actions[bot]
ae33427e1a
chore(master): release 1.2.0 (#282)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-25 17:02:36 -07:00
Steven Arcangeli
ffb5fd0aa7 fix: type annotations and type errors 2023-08-13 09:57:48 -07:00
Steven Arcangeli
81713b37d1 ci: add a pre-push script 2023-08-13 09:34:56 -07:00
Steven Arcangeli
a49ba4a948 ci: run type check in actions 2023-08-13 08:13:52 -07:00