Commit Graph

42 Commits

Author SHA1 Message Date
Alexander Courtis
c9104a5d07
chore: style: align_continuous_similar_call_args (#2937)
* chore: style: align_continuous_similar_call_args

* chore: style: align_continuous_similar_call_args

* chore: style: align_continuous_similar_call_args

* chore: style: align_continuous_similar_call_args

* chore: style: consistent use of double quotes
2024-09-30 15:34:01 +10:00
Alexander Courtis
1ae1c33ce1
chore(#2931): stylua -> EmmyLuaCodeStyle (#2932)
* stylua -> EmmyLuaCodeStyle: config and doc

* stylua -> EmmyLuaCodeStyle: CI

* stylua -> EmmyLuaCodeStyle: CI

* stylua -> EmmyLuaCodeStyle: CI

* stylua -> EmmyLuaCodeStyle: CI

* stylua -> EmmyLuaCodeStyle: CI

* stylua -> EmmyLuaCodeStyle

* stylua -> EmmyLuaCodeStyle: call_arg_parentheses = always

* stylua -> EmmyLuaCodeStyle

* stylua -> EmmyLuaCodeStyle
2024-09-29 14:05:52 +10:00
Zifan Zhu
45a93d9979
fix(#2862): windows path replaces backslashes with forward slashes (#2903)
* Fix Winodws path issue by replacing backslashes with forward slashes

* Fix #2862 (handle all filename-related tasks)

* fix type mismatch

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-09-15 12:23:37 +10:00
Michael Härtl
466fbed3e4
fix(#2859): make sure window still exists when restoring options (#2863)
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-08-10 12:21:48 +10:00
Epheien
12a9a995a4
fix(#2819): experimental.actions.open_file.relative_path issue following change directory (#2820)
fix issue with the description of epheien in #2819

Co-authored-by: eph <eph@MacBook-Pro.local>
2024-07-07 15:53:04 +10:00
Epheien
869c064721
feat(#2127): add experimental.actions.open_file.relative_path to open files with a relative path rather than absolute (#2805)
* temp workaround for issue #2803

* fix #2127 and #2803

* chore(#2127): read the configuration correctly

* feat(#2127): add help

* feat(#2127): normalise relative_path in config hierarchy

* feat(#2127): update help

---------

Co-authored-by: eph <eph@MacBook-Pro.local>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2024-07-07 12:51:43 +10:00
Alexander Courtis
8704b6f7fc
chore(#2787): minimum nvim version 0.9, replace 0.10 deprecated, enable deprecated warnings (#2788)
* refactor(#2787): replace deprecated

* refactor(#2787): enable deprecated checks

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): use inline deprecation disabling

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): replace deprecated

* refactor(#2787): deprecated are now warnings

* refactor(#2787): 0.9 is the minimum supported version

* Revert "refactor(#2787): replace deprecated"

This reverts commit b6b4c32fcb.

* refactor(#2787): suppress deprecated until 0.11

* refactor(#2787): minimum nvim version 0.8 -> 0.9

* refactor(#2787): reset globals

* refactor(#2787): explicitly check for vim.diagnostic.is_enabled function presence
2024-06-09 12:24:35 +10:00
Alexander Courtis
26632f496e
chore(#2731): neovim luadoc 0.10 compliance (#2786)
* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings, type gymnastics

* refactor(#2731): resolve warnings, type gymnastics

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): handle cwd unavailable when opening

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings, type gymnastics

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): style

* refactor(#2731): add _meta library, explicit check disables

* refactor(#2731): add lua-language-server manual install instructions

* refactor(#2731): resolve warnings

* refactor(#2731): explicitly set all diagnostics, reduce deprecated to hint

* Revert "refactor(#2731): resolve warnings"

This reverts commit 9c0526b7b0.

* Revert "refactor(#2731): resolve warnings"

This reverts commit f534fbc606.

* refactor(#2731): handle directory unavailable when deleting

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): resolve warnings

* refactor(#2731): handle directory unavailable when creating explorer

* refactor(#2731): add all nvim lua libraries

* refactor(#2731): resolve warnings

* refactor(#2731): remove vim global

* refactor(#2731): disable deprecated until we have a 0.9->0.10 story
2024-06-01 15:24:03 +10:00
Alexander Courtis
64f61e4c91
fix(#925): handle newlines in file names (#2754) 2024-05-04 13:51:13 +10:00
Azad
13f967f8e7
chore: add type annotations and resolve LSP warnings (#2555)
* chore: add type annotations to (almost) all functions

* stylua

* Add classes for symlink nodes

* Replace deprecated `@vararg`

* Move node classes to `node` module

* Fix `Symlink*` classes

* add vim and libuv runtime for luals, qualify libuv types

* add scripts/luals-check, not quite ready for CI

* additional nil checks for git/init.lua and git/runner.lua

* additional nil checks for nvim-tree.lua

* wrap vim.cmd-as-a-function calls inside functions

* vim.tbl_filter predicate returns booleans

* Revert "add scripts/luals-check, not quite ready for CI"

This reverts commit c70229cad9.

* Add `MinimalNode` class in `marks` module

* Fix various LSP warnings

* stylua

* Fix `Explorer` class, update related annotations and add necessary checks

* Add missing annotations to `live-filter`

* Add temporary aliases for `uv.*` types

* Resolve remaining LSP warnings

* Revert changes not related to internal types

* Minor adjustments

* Update doc comments style

* Minor adjustments (pt. 2)

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-12-09 11:34:35 +11:00
Alfonso Ros
52a1c99bf0
feat(#2530): keep alt filename on node.open.replace_tree_buffer (#2531)
Co-authored-by: Alfonso Ros <alfonso.ros@apex.ai>
2023-11-19 14:38:55 +11:00
umlx5h
aaee4cd896
feat: api.node.open.preview_no_picker with default mapping <S-Tab> (#2464)
* feat: add preview with no window picker action

* feat: preview_no_window_picker -> preview_no_picker

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-15 14:04:04 +11:00
Alexander Courtis
53b0bcaada
chore: stylua column width 120 -> 140 (#2448)
* chore: stylua column width 120 -> 140

* chore: stylua column width 120 -> 140, tidy

* Revert "chore: stylua column width 120 -> 140, tidy"

This reverts commit 8a0524d6bd.

* chore: stylua column width 120 -> 140, tidy watcher.lua

* chore: stylua column width 120 -> 140, tidy diagnostics.lua

* chore: stylua column width 120 -> 140, tidy git.lua

* chore: stylua column width 120 -> 140, tidy open-file.lua

* chore: stylua column width 120 -> 140, tidy system-open.lua

* chore: stylua column width 120 -> 140, tidy runner.lua
2023-10-08 11:40:58 +11:00
davisthedev
7c4c7e4e98
fix(#2352): windows: escape special filename characters on edit (#2374)
* Fix escape special characters on windows

fixes #2362

* use utils for windows check

* Add function to escape special chars on windows

* Change escape string function to use and/or

* Add nil check in escape special chars function

---------

Co-authored-by: Davis Sanders <dsanders@smartlink.city>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-08-20 13:27:33 +10:00
Alexander Courtis
b6574056b5
fix(#2191): edit: disregard floating windows (#2212) 2023-05-15 10:38:11 +10:00
Alexander Courtis
89816ace70
fix(#2191): edit: disregard floating windows (#2209) 2023-05-14 11:30:01 +10:00
gegoune
0df384b6c0
feat(api): add node.open.drop() (#2164)
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-04-30 09:35:25 +02:00
Alexander Courtis
9c60947926
fix(#2175): check number of actions.open_file.window_picker.chars before picking window (#2177) 2023-04-30 15:56:46 +10:00
hinell
d68b00a63e
feat(api): Add new node selection action based on tab :drop command (#2161)
Co-authored-by: gegoune <dev@clog.rocks>
2023-04-23 02:41:21 +03:00
Anshuman Medhi
8f392fa763
fix(#2126): custom window pickers may create windows (#2140)
call nvim_list_wins again after the picker is run
2023-04-16 15:58:10 +10:00
Alexander Courtis
04f99f14b5
fix(#2003): obey user split command for modified buffers when hidden not set (#2008) 2023-02-20 10:04:55 +11:00
David Sierra DiazGranados
d85b6718ce
feat(picker): allow custom function actions.open_file.window_picker.picker (#1782)
* feat: allow passing a custom function as a window picker

WIP

* fix: move logic expression to if statement

If `M.window_picker.custom_function()` returns `nil` then `pick_win_id()`
will run (the or part). We don't want that. More verbose, but better.

* feat(open): add window_picker.picker

* feat(open): add window_picker.picker

* style nit

* feat(open): add window_picker.picker

* docs: add window_picker.picker documentation

* docs: add window_picker.picker documentation

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-12-16 15:14:33 +11:00
Anton
e8ea62c198
fix(#1824): Don't modify jumplist when edit_in_place. (#1825) 2022-12-16 14:08:27 +11:00
Alexander Courtis
8cc369695b
fix: replace vim.* "requires" with explicit calls to vim functions (#1701) 2022-11-06 10:37:33 +11:00
Alexander Courtis
33ce8e3c73
fix(#1711): open in a new window when no window picker and no available window (#1715) 2022-11-05 10:23:03 +11:00
Alexander Courtis
dd90bfa155
fix(#1671): split with no window picker will always find an available window (#1677) 2022-10-29 13:42:56 +11:00
Alexander Courtis
e94f517798 fix(#1675): open-file sanity check mode 2022-10-22 14:40:20 +11:00
Ali Almohaya
c995ce0878
fix(#1643): preview on floating window (#1648)
* fix: preview on floating window

* chore: redrawing the tree after setting current win

* chore: ignore winleave autocmd on preview action

* fix: typo in comment

* chore: call correct window id

* chore: revert changes in focus method

* chore: check if float window is enabled before ignoring WinLeave
2022-10-16 12:17:17 +11:00
Alexander Courtis
c4ac723a83
fix(#1626): obey splitright/below when splitting existing windows (#1641) 2022-10-15 10:22:03 +11:00
emmanueltouzery
79f631bc1d
feat(view): add float.quit_on_focus_loss, float respects actions.open_file.quit_on_open (#1621) 2022-10-08 14:35:20 +11:00
rapan931
45d386a359
fix: remove unnecessary conditions (#1614) 2022-09-30 13:37:31 +02:00
rapan931
11b524899f
fix: restore eventignore (#1612) 2022-09-29 13:55:24 +02:00
Alexander Courtis
fbd421da71 chore: remove non-functional sides bottom/top 2022-09-22 13:53:09 +10:00
Alexander Courtis
5cb87c037d
fix(#1553): set correct side on vim open directory (#1594) 2022-09-22 09:06:23 +10:00
Alexander Courtis
e282420111
fix(#1564): reset &bufhidden when opening an existing (maybe previewed) buffer (#1573) 2022-09-05 10:10:58 +10:00
Krzysztof Cieśla
7323c81bd6
feat(view): Floating nvim tree window #1377 (#1462)
* Simple mock-up of floating nvim-tree window

* Passing whole table to nvim_open_win()

* Run update-help.sh

* Use vim.api alias

* Add comment to float options

* Added `anchor` to float options

* Enabling float window enforces `actions.open_file.quit_on_open`

* Added documentation

* add view.float.open_win_config, skipping validation

* Made nvim-tree window closes when float is enabled

* Close nvim-tree window when out of focus

* Update help

Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-08-06 15:40:07 +10:00
kiyan
8dc2144e87 refactor: use vim.ui.input for y/n selections
also add clear_prompt again.
fixes #1441
2022-07-19 11:31:09 +02:00
kiyan
2edbe759cd fix(open-file): vim.op -> vim.opt 2022-07-18 15:44:52 +02:00
kiyan
1ee6a3ea65 feat(create-file): use vim.ui.select for confirmation
fixes #1434
fixes #1294
2022-07-18 14:32:19 +02:00
kiyan
4900d66370 fix(open-file): focus file if already opened 2022-07-16 15:38:50 +02:00
Kiyan
89becc7604
feat(marks): add navigation (next, previous, select) (#1415) 2022-07-16 10:40:47 +02:00
Kiyan
831f1158c3
refactor(actions): move actions into semantic modules (#1410) 2022-07-10 09:47:52 +02:00