fix(readme): errors in readme
This commit is contained in:
parent
a1f50b734e
commit
f49f15ff90
16
README.md
16
README.md
|
@ -51,7 +51,7 @@ require("lf").setup({
|
|||
}
|
||||
})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<mapping>", "<cmd>lua require('lf').start()", { noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<mapping>", "<cmd>lua require('lf').start()<CR>", { noremap = true })
|
||||
```
|
||||
|
||||
Another option is to use `vim.keymap.set`, which requires `nvim` 0.7.0 or higher. This doesn't require local
|
||||
|
@ -109,7 +109,8 @@ The highlight groups that I know for sure work are the ones mentioned above (`No
|
|||
|
||||
### Default Actions
|
||||
These are various ways to open the wanted file(s). The process works by creating a Neovim mapping to send
|
||||
`lf` a command to manually open the file. The available commands are anything that can open a file.
|
||||
`lf` a command to manually open the file. The available commands are anything that can open a file in Vim.
|
||||
See `tabpage.txt` and `windows.txt`
|
||||
|
||||
### Resizing Window
|
||||
The configuration option `layout_mapping` is the key-mapping that will cycle through the window `views`.
|
||||
|
@ -117,7 +118,7 @@ Once the last view is reached, the cycle is restarted.
|
|||
|
||||
### Neovim 0.7.0
|
||||
If you do not have the nightly version of `nvim`, then the `mappings` field can be set to false.
|
||||
Otherwise, a notification will be display saying that you are not allowed to use these.
|
||||
Otherwise, a notification will be displayed saying that you are not allowed to use them.
|
||||
|
||||
```lua
|
||||
require("lf").start({ mappings = false })
|
||||
|
@ -132,15 +133,10 @@ The mappings that are listed in the `setup` call above are the default bindings.
|
|||
* `<C-t>` = `tabedit`
|
||||
* `<C-x>` = `split`
|
||||
* `<C-v>` = `vsplit`
|
||||
* `<C-o>` = `tab drop`
|
||||
* `<C-o>` = `tab drop` (`<A-o>` is also suggested)
|
||||
* `<A-u>` = resize the floating window
|
||||
|
||||
A suggested binding to use to open `Lf` is `<C-o>` or `<A-o>`.
|
||||
|
||||
### TODO
|
||||
- [ ] `:LfToggle` command
|
||||
- [x] Find a way for `lf` to hijack keybindings
|
||||
- [x] Cycling through various sizes of the terminal (similar to `rnvimr`)
|
||||
- [x] Set `tmux` title of ToggleTerm
|
||||
- [ ] Save previous size when terminal is closed, so it is restored on open
|
||||
- [ ] Maybe: Disable `lualine` and other status lines
|
||||
- [ ] Set Lualine to `Lf` title
|
||||
|
|
|
@ -4,7 +4,6 @@ local M = {}
|
|||
|
||||
local fn = vim.fn
|
||||
local api = vim.api
|
||||
local fmt = string.format
|
||||
local levels = vim.log.levels
|
||||
|
||||
---Echo a message with `nvim_echo`
|
||||
|
@ -40,7 +39,7 @@ end
|
|||
M.notify = function(msg, level)
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
level = level and levels[level:upper()] or levels.INFO
|
||||
vim.notify(fmt("[lf]: %s", msg), level)
|
||||
vim.notify(("[lf]: %s"):format(msg), level)
|
||||
end
|
||||
|
||||
---Helper function to derive the current git directory path
|
||||
|
@ -70,7 +69,7 @@ M.map = function(mode, lhs, rhs, opts)
|
|||
if ok and opts.desc then
|
||||
wk.register(
|
||||
{
|
||||
[lhs] = {opts.desc}
|
||||
[lhs] = opts.desc
|
||||
},
|
||||
{mode = mode}
|
||||
)
|
||||
|
|
|
@ -53,20 +53,6 @@ if vim.g.lf_netrw == 1 then
|
|||
end,
|
||||
100
|
||||
)
|
||||
|
||||
-- This is identical to the function above
|
||||
-- local timer = uv.new_timer()
|
||||
-- timer:start(
|
||||
-- 100,
|
||||
-- 0,
|
||||
-- vim.schedule_wrap(
|
||||
-- function()
|
||||
-- -- timer:stop()
|
||||
-- timer:close()
|
||||
-- require("lf").start(path:absolute())
|
||||
-- end
|
||||
-- )
|
||||
-- )
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
Reference in New Issue