mirror of
https://github.com/gyoder/dots.git
synced 2026-04-05 13:32:53 +00:00
nvim overhaul
This commit is contained in:
parent
a34e41df2e
commit
70a1581228
13 changed files with 319 additions and 305 deletions
|
|
@ -57,45 +57,18 @@ vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
|
|||
|
||||
-- Better Term
|
||||
|
||||
local betterTerm = require('betterTerm')
|
||||
-- toggle firts term
|
||||
vim.keymap.set({ "n", "t" }, "<leader>tt", betterTerm.open, { desc = "Open terminal" })
|
||||
-- Select term focus
|
||||
-- vim.keymap.set({"n"}, "<leader>tf", betterTerm.select, { desc = "Select terminal"})
|
||||
-- Create new term
|
||||
local current = 2
|
||||
vim.keymap.set(
|
||||
{ "n" }, "<leader>tn",
|
||||
function()
|
||||
betterTerm.open(current)
|
||||
current = current + 1
|
||||
end,
|
||||
{ desc = "New terminal" }
|
||||
)
|
||||
|
||||
-- Neotree
|
||||
|
||||
local ntc = require('neo-tree.command')
|
||||
vim.keymap.set('n', '<C-b>', function()
|
||||
local reveal_file = vim.fn.expand('%:p')
|
||||
if (reveal_file == '') then
|
||||
reveal_file = vim.fn.getcwd()
|
||||
else
|
||||
local f = io.open(reveal_file, "r")
|
||||
if (f) then
|
||||
f.close(f)
|
||||
else
|
||||
reveal_file = vim.fn.getcwd()
|
||||
end
|
||||
end
|
||||
ntc.execute({
|
||||
action = "focus", -- OPTIONAL, this is the default value
|
||||
source = "filesystem", -- OPTIONAL, this is the default value
|
||||
position = "right", -- OPTIONAL, this is the default value
|
||||
reveal_file = reveal_file, -- path to file or folder to reveal
|
||||
reveal_force_cwd = true, -- change cwd without asking if needed
|
||||
toggle = true,
|
||||
})
|
||||
end,
|
||||
{ desc = "Show Sidebar" }
|
||||
)
|
||||
-- local betterTerm = require('betterTerm')
|
||||
-- -- toggle firts term
|
||||
-- vim.keymap.set({ "n", "t" }, "<leader>tt", betterTerm.open, { desc = "Open terminal" })
|
||||
-- -- Select term focus
|
||||
-- -- vim.keymap.set({"n"}, "<leader>tf", betterTerm.select, { desc = "Select terminal"})
|
||||
-- -- Create new term
|
||||
-- local current = 2
|
||||
-- vim.keymap.set(
|
||||
-- { "n" }, "<leader>tn",
|
||||
-- function()
|
||||
-- betterTerm.open(current)
|
||||
-- current = current + 1
|
||||
-- end,
|
||||
-- { desc = "New terminal" }
|
||||
-- )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue