Skip to content

Commit 0e56536

Browse files
committed
ref: use vim.ui.input instead of nui
This is to let users choose the ui for input. Thanks to @lmburns for the idea. Ref #2
1 parent 6b63bed commit 0e56536

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ you can create notes on current position to either lists.
1111
3. [Installation](#installation)
1212
- [Config](#config)
1313
- [Lazy Loading](#lazy-loading)
14-
4. [License](#license)
14+
4. [Related Projects](#related-projects)
15+
5. [License](#license)
1516

1617
## Demo
1718

@@ -117,6 +118,12 @@ use({
117118
})
118119
```
119120

121+
## Related Projects
122+
123+
- [nvim-bqf](https://github.com/kevinhwang91/nvim-bqf): manipulate lists with fzf
124+
- [replacer.nvim](https://github.com/gabrielpoca/replacer.nvim): makes a quickfix list editable in both content and file path
125+
- [quickfix-reflector.vim](https://github.com/stefandtw/quickfix-reflector.vim): change code right in the quickfix window
126+
120127
## License
121128

122129
Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details.

lua/listish/init.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
local nvim = require("nvim")
2-
local util = require("arshlib.util")
32
local quick = require("arshlib.quick")
43

54
---When using `dd` in the quickfix list, remove the item from the quickfix
@@ -121,12 +120,13 @@ end --}}}
121120
-- to the list.
122121
-- @param is_local boolean if true, the item goes into the local list.
123122
local function add_note(is_local) --{{{
124-
util.user_input({
123+
vim.ui.input({
125124
prompt = "Note: ",
126-
on_submit = function(value)
125+
}, function(value)
126+
if value then
127127
insert_note_to_list(value, is_local)
128-
end,
129-
})
128+
end
129+
end)
130130
end --}}}
131131

132132
-- selene: allow(global_usage)

0 commit comments

Comments
 (0)