Comments (15)
Hey guys - sorry for the silence - I haven't had the time to read through your discussion till today.
Yes the issue was that the filenames was transliterated to the keymap setting and you've fixed it - I've updated to MunifTanjim/nui.nvim@fbb139c and it works!
🙏 thanks a million!
from neo-tree.nvim.
Hello... This could be something that nui.nvim
never handled, because nobody reported it... or could be an upstream neovim
issue. We need to be able to reproduce it for being sure where the issue is.
from neo-tree.nvim.
Ah man 🤣 damn! I completely forgot about that. Thanks so much for bringing that up. I'll do some more testing before merging this.
It should also have unit tests... last time I tried to add unit test for this, I failed. I'll try to do that again.
from neo-tree.nvim.
If I'm not mistaken, this should be a nui issue (an underlying library we rely on).
Could you give us your insights @MunifTanjim ?
I am terribly sorry for pinging you if I was wrong.
from neo-tree.nvim.
@gerazov Unfortunately I'm not able to reproduce your problem (since I don't know Cyrilics...).
Could you copy your setup into the following code and see if the problem is reproducable?
Save this code into any file (like repro.lua
) and then :source repro.lua
inside neovim. You should see an input popup near your cursor.
If this code doesn't reproduce the issue, could you still send me list of options you set that might be affecting the issue? (I'm using manjaro as well, so no need to reproduce it on other OS.)
local Input = require("nui.input")
-- ─────────────────────────────── Change lmap ───────────────────────────────
-- Please set your iminsert, langmap, keymap etc settings that might be relevant.
vim.cmd([[
" set iminsert=0
" set iminsert=1
" set langmap=zy,yz,ZY,YZ
]])
-- or using lua
-- vim.opt...
-- please paste some default input value that will be affected.
local default_value = "zyZY"
-- ─────────────────────────────── Change lmap ───────────────────────────────
local popup_options = {
relative = "cursor",
position = {
row = 1,
col = 0,
},
size = 20,
border = {
style = "rounded",
text = {
top = "[Input]",
top_align = "left",
},
},
win_options = {
winhighlight = "Normal:Normal",
},
}
local input = Input(popup_options, {
prompt = "> ",
default_value = default_value,
on_close = function()
print("Input closed!")
end,
on_submit = function(value)
print("Value submitted: ", value)
end,
on_change = function(value)
print("Value changed: ", value)
end,
})
input:mount()
from neo-tree.nvim.
When you set vim.opt.iminsert = 1
, it sets that option globally. So when you open a new float/split, that float/split will also have iminsert=1
. This is how neovim behaves.
If you only want to set iminsert = 1
locally for a specific buffer, do vim.opt_local.iminsert = 1
or :setlocal iminsert=1
.
from neo-tree.nvim.
I'm not sure if nui.nvim
can have a patch for this. It might make sense for a file tree plugin to always have iminsert=0
for its popup... but different behavior can be desired in a different use-case.
If neo-tree
decides it should always be iminsert=0
, it can use the buf_options
to do that: https://github.com/MunifTanjim/nui.nvim/blob/main/lua/nui/popup/README.md#buf_options
from neo-tree.nvim.
@MunifTanjim I think this is caused because you pass "t"
as the second argument to nvim_feedkeys
here.
I'm not actually sure what quirks will happen but I think you can temporary set iminsert
to 0 before feeding the keys and then setting it back to the old value right after that.
If I understand correctly, this should type the default_value
as-is into the buffer, and swtich back to user's input method layout right after that.
from neo-tree.nvim.
Oh, I didn't realize it's happening for default_value
. I thought we're talking about when user is typing.
If the suggested fix solves the issue, it should definitely be merged into nui.nvim
.
I still can't reproduce it myself. So I can't really verify if the solution works.
from neo-tree.nvim.
Oh, I thought OP was talking about the default value being translated to cyrilics letters. And I couldn't reproduce it as well: #1370 (comment).
Did you type the new name yourself @gerazov , and requesting neo-tree to default to english keyboard in input fields?
from neo-tree.nvim.
Nevermind, I reproduced it.
- Do
:set keymap=greek_utf-8
- Open neo-tree
- Open rename popup
@pysan3 can you verify that MunifTanjim/nui.nvim#347 solves it?
from neo-tree.nvim.
I'm currently not on my PC so please wait a day or so
I remember "t" was chosen to solve this issue. MunifTanjim/nui.nvim#257
Does your change not bring this issue again?
from neo-tree.nvim.
So, MunifTanjim/nui.nvim#257 was caused because of "n", false
. MunifTanjim/nui.nvim#258 changed it to "t", true
.
And this issue is caused because of "t"
.
Looks like
vim.api.nvim_feedkeys(self._.default_value, "n", true)
solves both issues.
from neo-tree.nvim.
Glad to hear that.
TBH I don't know how nvim_feedkeys
works and cannot understand the difference between those options :kekw:.
I've tested your PR branch (and also was able to reproduce the issue with the main branch) and can confirm that your fix does solve the issue.
Thanks a lot on working on it!
from neo-tree.nvim.
Problem will be dealt upstream.
Closing on our end.
Please ping me again if this fix does not solve the problem @gerazov .
I hope I can hear from you again as it was difficult to iron out the problem without your interaction.
from neo-tree.nvim.
Related Issues (20)
- FEATURE: Resize vsplits on open
- BUG: reveal ignores dir when called together with reveal_file
- FEATURE: Flat view support
- BUG: Toggling neotree and then closing a buffer expands neotree HOT 2
- FEATURE: Custom date format string in `last_modified` and `created` components
- BUG: when I switch NeoTree, it flashes black before becoming transparent
- FEATURE: indent marker level
- FEATURE: auto select first file of directory after opening a directory
- FEATURE: Option to Show Song Metadata/ID3 for MP3 Files
- BUG: Stack overflow when cutting and pasting a file with 'hide_root_node = true'. HOT 1
- FEATURE: show full path on hover
- BUG: <C-b> useless HOT 6
- BUG: neo-tree diagnostic icons won't work
- How to make NeoTree NOT close after i open a file? HOT 1
- BUG: Weird symbols at the end of file info line on windows HOT 1
- [question] How to undo ALL copy_to_clipboard actions HOT 1
- BUG: UI gets all screwed up when scrolling on code or the neo-tree itself HOT 7
- FEATURE: non-git ignore files HOT 1
- BUG: Can't unbind actions HOT 2
- BUG: dev folder is always shown, even if excluded with .gitignore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-tree.nvim.