Commit Graph

175 Commits

Author SHA1 Message Date
Alexander Courtis
b81ab199a5 fix(help): clear git signs before draw 2022-07-09 11:44:39 +10:00
Toby O'Sullivan
38fabe86cb
Optionally suppress the symlink destination (#1396) 2022-07-05 10:05:21 +02:00
Alexander Courtis
1fc0eee946
fix(#1354): add missing :hi NvimTreeFileIgnored (#1358) 2022-06-18 10:42:12 +02:00
lu5je0
821f050fda
feat: full-name of node in floating window (#1305) 2022-06-06 11:15:03 +02:00
Rammiah
6f6eab14dc
feat(renderer): indent_markers add a item icon (#1321) 2022-06-05 14:19:19 +02:00
Kiyan
2002b21be7
feat(resize): add ability to grow and shrink the tree when drawing (#1293)
Will adapt the view size based on the longest line.
fixes #865
2022-05-31 09:05:00 +02:00
Alexander Courtis
3ba383d591
chore/remove globals (#1279)
* remove renderer globals: nvim_tree_add_trailing nvim_tree_highlight_opened_files nvim_tree_root_folder_modifier nvim_tree_special_files

* remove renderer globals: nvim_tree_icon_padding

* remove renderer globals: nvim_tree_symlink_arrow

* remove renderer globals: nvim_tree_show_icons, nvim_tree_show_icons

* remove renderer globals: nvim_tree_git_hl

* remove renderer globals: nvim_tree_group_empty

* remove renderer globals: respect_buf_cwd

* remove renderer globals: nvim_tree_create_in_closed_folder

* remove globals: consistency in legacy checks

* remove renderer globals: nvim_tree_special_files

* renderer.icons.symbols -> glyphs
2022-05-28 11:08:40 +10:00
Kiyan
6343813a35
feat(live-filter): add ability to live filter out nodes in the tree (#1056) 2022-05-17 10:03:49 +02:00
kiyan
9d26594b6c fix(renderer): empty space at end of line
fixes #1253
2022-05-15 10:28:17 +02:00
kiyan
7293f8dc70 fix(renderer): padding when git icons are after the name
fixes #1253
2022-05-14 13:41:58 +02:00
kiyan
d88d12f5bc Revert "#1253 only pad git icons when they are present (#1259)"
This reverts commit 90d7b8edb1.
fixes #1267
2022-05-14 13:31:37 +02:00
Kiyan
f8312cd06f
feat(renderer): add ability to set git icons in signcolumn (#1242) 2022-05-14 09:54:27 +02:00
Alexander Courtis
90d7b8edb1
#1253 only pad git icons when they are present (#1259) 2022-05-14 09:35:44 +02:00
Kiyan
a1600e57f2
feat(renderer): allow placing git icons after filename (#1203)
This feature allows placing git icons after the filename.
2022-05-07 14:05:51 +02:00
Kiyan
db873b340d
chore(diagnostics): move updates to renderer (#1218)
should address #1216
2022-05-07 11:14:32 +02:00
kiyan
ce2cf7131f refactor(renderer): refactor git handling
Concat and apply git highlight inside the builder.
This allows to not leak private data from builder to the git component.
This will also now allow us to customize git icon placement.
2022-04-26 22:59:16 +02:00
kiyan
0d6c0dda3d refactor(renderer): remove set_folder_hl function from icons
This greatly simplifies the folder highlighting logic. It wasn't clear
before and the code was probably doing more than it should. The logic
with highlight_opened_file wasn't working at all, so i just removed it.
This should allow us to greatly extend the order in which the components
are rendered.
2022-04-26 22:28:40 +02:00
kiyan
d8fe48a887 refactor(renderer): return hl group from get_file_icon
this allows to not pass private data from builder to component
2022-04-26 21:50:34 +02:00
kiyan
efcadc482b refactor(renderer): extract build line function 2022-04-24 15:08:05 +02:00
kiyan
785761591f stylua 2022-04-24 14:43:41 +02:00
kiyan
2c46464226 chore: add more sensible defaults for icons
adds a symlink and default icon by default
fixes #1192
2022-04-24 11:29:03 +02:00
kiyan
2bf6241989 fix(renderer): render hl should take a table of saved highlights
fixes #1190
2022-04-24 11:20:23 +02:00
Alexander Courtis
c46653b4a3 #1186 open fail when nvim_tree_show_icons.folders = 0 2022-04-24 11:43:28 +10:00
kiyan
15d5e0609a refactor(renderer): extract folder name creation 2022-04-23 15:36:27 +02:00
kiyan
ec6ccf33ff refactor(renderer): abstract configuration related code
- vim.g variables passed as configuration for builder in
  renderer/init.lua.
- pass special and pictures maps during configuration
2022-04-23 15:27:30 +02:00
kiyan
d44742bee5 refactor(renderer): line creation into a builder pattern
- use a builder pattern to mount the lines / highlights
- i think we lost a little performance, but gain in design
- code for file/folder icons is abstracted in components/icons.lua
- should also fix the issues where vim.g variables where loaded before
  setup.
2022-04-23 15:15:10 +02:00
kiyan
d4d02cd4d1 fix: formatting 2022-04-23 12:34:56 +02:00
kiyan
3ecf22ced1 refactor(renderer): icon_state under module table and code smells
- remove line / hl builder from module table and rename function
- icon_state -> M.icon_state
- extract should_show_arrows
2022-04-23 11:58:33 +02:00
kiyan
73fe08d241 refactor(renderer): simplify loop and builders
- do not recur inside folder builder
2022-04-23 11:52:57 +02:00
kiyan
d369ddccb3 refactor(renderer): extract opened file highlighting 2022-04-23 11:42:32 +02:00
kiyan
a419da1f2c refactor(renderer): reorganize file for further refacto 2022-04-23 11:35:04 +02:00
kiyan
df41b0c586 refactor(renderer): extract folder builder 2022-04-23 11:22:28 +02:00
kiyan
018ba086d4 refactor(renderer): extract file builder 2022-04-23 11:20:03 +02:00
kiyan
de49bf4da6 refactor: extract symlink function 2022-04-23 11:17:25 +02:00
kiyan
3084e483ae chore: refacto file placement of renderer components 2022-04-23 11:14:16 +02:00
kiyan
ce463a53ae Revert "chore: use api to check if buf is loaded"
This reverts commit db91909f5b.
fixes #1182
2022-04-21 21:31:42 +02:00
kiyan
db91909f5b chore: use api to check if buf is loaded 2022-04-21 20:46:24 +02:00
Alexander Courtis
cdbc210d92
#1172 add renderer.icons.webdev_colors default true (#1175) 2022-04-18 15:45:14 +02:00
Alexander Courtis
d5e4f0655b
add view.indent_markers (#1134) 2022-04-10 15:40:29 +02:00
Matthew Steedman
924aa29092
feat: add hl_group for file icons (#1131) 2022-04-04 09:33:11 +02:00
kiyan
1831417f05 refacto: add get_nodes_starting_line core util 2022-03-26 14:46:44 +01:00
Alexander Courtis
54c78dbca2
#791 add profiling for some operations (#1108) 2022-03-26 13:22:28 +01:00
Gary Sentosa
ecbe3ade95
fix: folder icon highlight (#1086) 2022-03-18 11:34:11 +01:00
kiyan
d93a93c9c1 fix: staged typechange in git
fixes #1066
fixes #885
2022-03-12 15:00:34 +01:00
kiyan
471afc13fe refacto: abstract TreeExplorer in core.lua 2022-03-09 22:01:54 +01:00
kiyan
d2b12d6055 chore: format 2022-03-09 21:33:20 +01:00
kiyan
144bce74a5 refacto: move renderer git into file
also view.is_root_folder_modifier_visible don't take the tree as
parameter
2022-03-09 21:32:15 +01:00
Andreas Bissinger
d5a12ac9db
fix: correct index in movement actions (#1058) 2022-03-09 09:03:22 +01:00
Kiyan
0816064a8b
chore: add stylua to format the codebase, and run on CI (#1055) 2022-03-06 17:33:30 +01:00
Kiyan
6da7467944
refacto: buffer management, setup fixes, autocmd fixes (#967) 2022-02-14 19:16:45 +01:00
kiyan
0f7da146bf chore: add guards to prepare setup refactoring 2022-02-11 11:06:11 +01:00
kiyan
525042317e fix: lint issues 2022-02-09 22:29:34 +01:00
kiyan
4fc9cb1da3 chore: move code around
- deprecate config.lua file
- move icon config code into renderer/icons
- move file opening config in open-file.lua
2022-02-09 22:26:02 +01:00
kiyan
879049ac03 fix: create buffer during setup schedule
and move view setup before setup schedule
Fixes #951
2022-02-09 19:29:43 +01:00
kiyan
ea92e7bf7c refacto: set tree explorer in the global state
also remove the redraw method and use renderer.draw immediately
2022-02-07 22:07:08 +01:00
kiyan
4a9e53143b refacto: ubiquitous language renaming
BREAKING
- rename all 'entry' to 'node' or '_node' if shadowing
- rename all 'entries' to 'nodes'
2022-02-05 18:10:09 +01:00
kiyan
2dfed89af7 chore: remove unused require 2022-01-21 16:13:49 +01:00
kiyan
b5c2e52ed0 fix(actions): help, close and custom only
fixes #908
2022-01-21 15:56:29 +01:00
kiyan
ba3f3357eb chore: remove redundant return in renderer/init 2022-01-21 12:09:04 +01:00
NiYanhhhhh
d874eb9065
fix: colors setup highlight and folder highlight range fix (#788) 2022-01-21 11:17:51 +01:00
kiyan
6488075d6a fix: do not indent for arrows when indent markers is active 2021-11-28 15:24:58 +01:00
kiyan
3916c0fc60 fix: handle CM git status 2021-11-28 14:35:05 +01:00
Kiyan
6662b60a2b
feat/chore: rewrite git with job and some other fixes (#743)
* feat/chore: rewrite git with job and some other fixes

* fix: fs clear window, rename echo_warning -> warn

also fix renaming and add an event blocker to avoid running many events
at the same time
2021-11-27 16:02:54 +01:00
kiyan
2298b63fff chore: add "C " and " C" git statuses (copied)
fixes #755
2021-10-30 11:21:13 +02:00
M.A
fd3969ec98
feat: add hide_root_folder (#728) 2021-10-24 16:48:57 +02:00
kiyan
ec3f10e211 chore: add R git state
closes #723
2021-10-16 17:53:46 +02:00
kiyan
86e6dc627e chore: move help rendering in its own file 2021-10-10 11:48:02 +02:00
gzygmanski
385f8c89e0
feat: show default file icon when nvim-devicon is not installed (#696) 2021-10-08 21:53:31 +02:00
Unoqwy
c0dcbbd285
add special files using absolute paths (#707) 2021-10-08 21:53:09 +02:00
kiyan
4de55440b8 fix: returns empty string instead of default icon by default 2021-10-02 23:11:13 +02:00
kiyan
1b04082872 fix: do not display empty string or nil callbacks in help view 2021-09-30 13:17:05 +02:00
kiyan
1b746744ad fix: renderer global options should be loaded on each reload 2021-09-27 19:43:23 +02:00
kiyan
67f1d36d1b fix: highlight git new file icon with gitnew not gitdirty 2021-09-27 19:39:10 +02:00
Hanfei Shen
11659aaa65
fix: help after refactoring view (#647) 2021-09-27 10:04:00 +02:00
kiyan
506d2e792a chore/fix: renderer module initializations
- put renderer into its own folder, extract the padding logic to make it
  reloadable. Will allow small refactorings of the rendering logic to
  make it easier to extend.
- get the icon state before each renderer reload
2021-09-26 12:29:47 +02:00