Commit Graph

105 Commits

Author SHA1 Message Date
hedy
e98041c75f Use lua to create commands 2023-11-01 14:29:56 +08:00
hedy
4f3993627b Merge upstream PR #119
simrat39/symbols-outline.nvim#119
2023-11-01 13:40:24 +08:00
hedy
5df2881500 fix(folding): Don't attempt to toggle non-foldable node 2023-10-31 21:06:50 +08:00
hedy
fe34bf0613 feat(folding): Support toggling of folds 2023-10-31 20:29:06 +08:00
hedy
b78a6b0592 Merge branch 'code_action' of github.com:zjp-CN/symbols-outline.nvim
simrat39/symbols-outline.nvim#168
2023-10-31 20:17:37 +08:00
Kevin Jeong
0cb15e31ab fix(folding): optimize fold/unfold all 2023-05-22 03:14:43 -07:00
zjp
e639dea62f fix(code_actions): use the builtin code_action
instead of `buf_request` to prevent from passing custom lsp.handlers
and this makes use of telescope if it's set by the user
2022-09-14 17:13:04 +08:00
Simrat Grewal
f57d70ac33 refactor: Move dfs to utils 2022-08-17 16:45:04 -07:00
Simrat Grewal
7c78007f25 refactor: Cleanup how parent_node is found when folding items 2022-08-17 16:40:31 -07:00
charburgx
b275066e23 style: Run stylua 2022-08-17 16:14:47 -05:00
charburgx
ced4e476cf feat: Add folding 2022-08-17 16:14:16 -05:00
Simrat Grewal
057715f3b0 Revert "feat(parser): Flatten outline items while parsing"
This reverts commit 776ddb3930.
2022-08-16 17:59:47 -07:00
Simrat Grewal
66b2422455 feat: Bring back auto_preview keymap 2022-08-15 15:06:37 -07:00
Simrat Grewal
47cbb20f52 feat: Bring back auto_preview 2022-08-15 14:59:40 -07:00
Simrat Grewal
ab3c25c3d9 refactor: Switch to new autocmd apis 2022-08-15 14:53:29 -07:00
Simrat Grewal
776ddb3930 feat(parser): Flatten outline items while parsing
* Removes the need for flatten_outline_items
* Improves performance
2022-08-15 14:31:19 -07:00
Simrat Grewal
f33bdb4be9 misc: formatting 2022-08-15 14:08:28 -07:00
Simrat Grewal
7747a020a6 feat(parser): Fix guide highlight for multi-width characters 2022-08-10 20:47:31 -07:00
Simrat Grewal
094334c1a8 feat(ui): Rework how highlights are applied to outlines
* Previously we used vim's pattern matching which is not a great way to
  do this in neovim, as tree-sitter doesn't support it.

* Now we use the neovim apis which are range based
2022-08-10 17:42:50 -07:00
Simrat Grewal
d7542aab11 refresh: Use view.is_open 2022-08-10 15:40:38 -07:00
Simrat Grewal
1188ed7201 (breaking_change) feat: Make setup explicit
Don't setup on its own
2022-08-10 15:33:23 -07:00
Simrat Grewal
ed6c058eee chore: stylua 2022-08-10 15:29:39 -07:00
Simrat Grewal
d1065bc492 fix: Fix close mapping 2022-08-10 15:24:37 -07:00
Simrat Grewal
9ff33755cd cleanup: Disable auto_preview for now
Till we clean this stuff up
2022-08-10 15:22:47 -07:00
Simrat Grewal
374b80010a feat: Use vim.keymap.set for setting keymaps 2022-08-10 15:08:46 -07:00
Simrat Grewal
d12af70950 state: Remove unused winnr/bufnr 2022-08-10 14:48:55 -07:00
Simrat Grewal
62b59f4de5 toggle: Use View:is_open 2022-08-10 14:47:25 -07:00
Simrat Grewal
50dd2e9275 feat(view): Turn View into a class and refactor closing 2022-08-10 14:46:01 -07:00
Michael Spradling
bb0cb4fcd0 Do not close outline when focus_location occurs
When auto_close is set to false, this patch does nothing.
However, when auto_close is set to true now the outline only closes when
the goto_location action is taken.  The action focus_location still
keeps the outline open.
2022-03-17 12:01:21 -04:00
FollieHiyuki
d980dbf947 Format with stylua 2022-02-22 22:32:53 +07:00
zeertzjq
d738b1defd fix: initialize code_win to 0 instead of nil
Ref <https://github.com/neovim/neovim/pull/16745>
2022-01-04 10:18:57 +08:00
Andrew
f98bc4de86 feat: added autoclose functionality 2021-11-23 05:09:08 +11:00
simrat39
042c8466a2 feat(providers): Inital COC support
Closes #68
Still needs support for code actions/hover/rename etc
2021-10-06 12:58:44 -07:00
simrat39
a0d563172d refactor: Add a generic provider module
In preperation for coc support
2021-10-05 22:46:53 -07:00
simrat39
6f376ef4ce refactor: Move should refresh logic to utils 2021-08-22 17:29:29 -07:00
simrat39
fae3393873 refactor: Move buffer/window creation to its own module
For now we have some stuff out of that module to prevent infinite
require loops (set_keymaps/clear_state), but once state goes into its
own module as well then we can work it all into view.lua
2021-08-22 17:22:16 -07:00
simrat39
c646d68fe8 refactor: Move nmap to utils 2021-08-22 17:00:24 -07:00
simrat39
ebf490a0e8 cleanup: Remove _prevent_buffer_override() function on BufLeave 2021-08-22 16:56:33 -07:00
simrat39
a4b701978f refactor: Move commands and autocommands to vimscript 2021-08-22 16:55:29 -07:00
simrat39
2932c11e92 refactor: Move debounce function to the utils 2021-08-22 16:38:26 -07:00
Omar Zeghouani
78b4f20b39 Simplify preview toggle 2021-08-21 10:17:12 +01:00
simrat39
079f39607a Update preview_toggle name 2021-08-20 19:11:24 -07:00
simrat39
a2e4a20308 Merge branch 'master' of https://github.com/ram02z/symbols-outline.nvim into ram02z-master 2021-08-20 19:06:46 -07:00
Omar Zeghouani
970d9932c5 Add help message for keybinds 2021-08-20 20:38:04 +01:00
Omar Zeghouani
23f1299869 Add toggle functionality
- Ensure that preview window always closes on symbol window exit
2021-08-20 20:25:22 +01:00
sim
2047f401e7 Merge pull request #50 from scheatkode/fix/refresh
fix: Handle window switching
2021-08-18 17:51:44 -07:00
scheatkode
bb8df852d2 fix: Handle window switching
The outline window is sometimes not refreshed when switching windows.
This is fixed by listening for `BufEnter` events.

A debouncing function is also added to prevent spamming the language
server.
2021-08-05 16:03:12 +01:00
scheatkode
b1d0fadac5 feat(config): Add preview keymap trigger 2021-08-05 13:52:25 +01:00
simrat39
1941d9edf9 Initial markdown support
Markdown doesnt have a language server, so do this manually
Closes #43
2021-08-01 12:22:01 -07:00
simrat39
63931775ce feat(config): Allow multiple keys for keymaps
Closes #45
2021-07-29 12:09:41 -07:00