Commit Graph

35 Commits

Author SHA1 Message Date
~hedy
f656ef12a5 Merge pull request #108 from epheien/feat-view-filter
feat: add view.filter option
2024-12-27 20:40:00 +08:00
eph
7fefc760ba feat: help filetype will not ignore to refresh 2024-12-27 19:49:57 +08:00
lunar
0196830391 fixed a bug in capturing guicursor style using regex 2024-11-14 19:59:56 +08:00
~hedy
41e7b88a2b fix: Error on goto_location when code window closed
Mentioned by @gennaro-tedesco in #91
2024-09-09 15:29:59 +08:00
~hedy
e0b86347ad feat: Focus outline if already open
closes #71
2024-05-30 07:52:51 +08:00
hedy
8c6b11e4c2 chore: stylua 2023-12-29 21:50:48 +08:00
hedy
8b2f412b7b fix(providers): Ensure working on nvim-0.7
This commit removed the ability to receive symbols from all attached
clients in the current buffer. Everything works as before when only one
client is attached to a buffer.

This also fixes outline LSP finding clients on nvim-0.7
2023-12-29 19:17:00 +08:00
hedy
d073791f1c fix: No-op keymaps when there is no provider 2023-12-13 18:40:08 +08:00
hedy
19d876246c fix: Outline auto-update
- Typo in checking for buflisted.
- As it turns out bufhidden isn't boolean, so let's not even consider it
  for now. Doing this still allows buffers like LspInfo to be ignored,
  it seems. In the future we will have configurable ignored buffers.

Thanks to @Djedouas for bringing it up.
2023-12-12 20:24:16 +08:00
hedy
8b9f908386 chore(fmt): stylua 2023-11-30 21:55:40 +08:00
hedy
a5411b0a0c fix: Ignore special buffers, fix auto-preview and not focus_on_open 2023-11-30 10:17:00 +08:00
hedy
4bbecbb92e feat: Auto-resize and re-position preview
Only for auto-preview.
2023-11-30 10:02:01 +08:00
hedy
c4dc273156 fix: Scroll window to content on no providers message 2023-11-29 21:52:59 +08:00
hedy
438d26896f feat: Still open/refresh outline when no providers 2023-11-29 17:32:07 +08:00
hedy
884486f3d0 feat: Live previews (peek editor)
Disabled by default, but if this feature turns out to be useful and
stable, it will replace the old preview window.
2023-11-28 20:50:08 +08:00
hedy
3ebf0ffc69 feat: Use augroup
I had no idea augroup does all I tried to do with `self.autocmds`. Oh
well.

Also added sidebar.id, which is one step closer to #25
2023-11-28 09:38:57 +08:00
hedy
dc942d03c3 chore(fmt): stylua 2023-11-27 20:16:26 +08:00
hedy
80165f0472 feat(providers): Modular hover-symbol support 2023-11-27 20:11:16 +08:00
hedy
80f76333ba fix/refactor(preview): Proper per-sidebar support & complete rewrite 2023-11-27 20:08:22 +08:00
hedy
b6b2bf2248 fix: segfault? 2023-11-26 22:36:20 +08:00
hedy
5b70292780 Refactor symbol types 2023-11-26 16:49:25 +08:00
hedy
c4da6670a4 refactor: Consistent naming of buf/win fields 2023-11-26 15:27:57 +08:00
hedy
c7d38eea24 refactor: Reorganize keymap order 2023-11-26 15:24:21 +08:00
hedy
39668e5061 feat: Go to corresponding code window after closing outline 2023-11-26 15:23:53 +08:00
hedy
b90174c6c2 refactor: Provider symbol actions
It makes sense to store the provider each sidebar is using with own
self.provider fields, no way that did not occur to me before this.

The old `_G._outline_current_provider` ironically, can now be replaced
by `require('outline').current.provider`.
2023-11-26 15:14:42 +08:00
hedy
1743ee7c66 chore(fmt): stylua 2023-11-26 13:29:47 +08:00
hedy
137e76fdca chore(fmt): Consistent function doc style 2023-11-26 13:27:29 +08:00
hedy
9f69f12161 refactor: Reorganize modules
Primarily:
- Utils
- Sidebar (removed the need of writer.lua)
- Resolve keymaps shortcut in config eraly
- Put highlight functions into highlight.lua
- Put functions that do stuff on outline window into view.lua
2023-11-26 13:17:18 +08:00
hedy
b83e84a15f Merge branch 'main' of github.com:hedyhli/outline.nvim 2023-11-25 16:24:24 +08:00
hedy
bdeff23390 refactor(writer): Move make_outline to sidebar
Was passing self fields a lot, decided to just do all that in Sidebar
in the first place.

Also resolved guides.enabled=false early to setting markers to ' '.

Everything should work the same.
2023-11-25 16:21:44 +08:00
hedy
6cea72f2b5 feat(api): Get symbol and breadcrumb at location
Currently the implementation is very limited.

Ref: #24

- Outline must be open and have been loaded for it to work (requires
  lazy loading or headless loading of Sidebar)
- Empty string returned if cursor is not in any symbol ('closest' symbol
  not yet supported)
- Line column not used
- Returning concatenated symbol names rather than a list of tables with
  node info (requires a refactor of outline.SymbolNode type)
- Subject to config.symbols.filter and folds (requires finding hover
  list somewhere outside of writer.make_outline)
2023-11-25 15:41:55 +08:00
hedy
c7a033e85d chore: Remove debug message 2023-11-25 11:25:26 +08:00
hedy
842f2c4a86 refactor(status,help): Rename module and make naming more descriptive 2023-11-24 17:16:44 +08:00
hedy
23958f8731 chore(fmt): stylua 2023-11-24 15:04:28 +08:00
hedy
e705330e40 feat: Per-tabpage outlines
Closes #37

Almost completely refactored the UI parts outline.nvim to use a Sidebar
object that implements an outline window. In init.lua, we can then store
a table of the outline for each tabpage ID.

When tabs are closed the outline is closed and sidebar reset
responsibly.

This simplifies `init.lua` quite a lot, making it the highest level
control center for the outline elements.

All lua APIs and commands should work as before.
2023-11-24 14:50:24 +08:00