feat: some stuff
This commit is contained in:
@@ -66,7 +66,7 @@ map("n", "<Leader>r", "<cmd>lua require('rest-nvim').run()<CR>", options)
|
||||
map("n", "<Leader>q", "<Esc>:q<CR>", options)
|
||||
|
||||
-- Open Nerdtree
|
||||
map("n", "<C-n>", ":NvimTreeToggle<CR>:TransparentEnable<CR>", options)
|
||||
map("n", "<C-n>", ":NvimTreeToggle<CR>", options)
|
||||
|
||||
-- Make ctrl+s work
|
||||
map("n", "<C-s>", "<Esc>:w<CR>", options)
|
||||
|
@@ -1,68 +1,68 @@
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local u = require("utils")
|
||||
local lazygit =
|
||||
Terminal:new(
|
||||
{
|
||||
cmd = "lazygit",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
winblend = 0,
|
||||
border = "shadow"
|
||||
},
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true})
|
||||
end,
|
||||
on_close = function(term)
|
||||
Terminal:close()
|
||||
end
|
||||
}
|
||||
Terminal:new(
|
||||
{
|
||||
cmd = "lazygit",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
winblend = 0,
|
||||
border = "shadow"
|
||||
},
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true})
|
||||
end,
|
||||
on_close = function(term)
|
||||
Terminal:close()
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
function _lazygit_toggle()
|
||||
lazygit:toggle()
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<C-g>", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
|
||||
|
||||
local pnpm =
|
||||
Terminal:new(
|
||||
{
|
||||
cmd = "pnpm dev",
|
||||
dir = "git_dir",
|
||||
size = 5,
|
||||
direction = "vertical",
|
||||
on_close = function(term)
|
||||
Terminal:close()
|
||||
end
|
||||
}
|
||||
Terminal:new(
|
||||
{
|
||||
cmd = "pnpm dev",
|
||||
dir = "git_dir",
|
||||
size = 5,
|
||||
direction = "vertical",
|
||||
on_close = function(term)
|
||||
Terminal:close()
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
function _pnpm_toggle()
|
||||
pnpm:toggle()
|
||||
pnpm:toggle()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Leader>d", "<cmd>lua _pnpm_toggle()<CR>", {noremap = true, silent = true})
|
||||
|
||||
local nvimConfig =
|
||||
Terminal:new(
|
||||
{
|
||||
cmd = "cd $HOME/.dotfiles && nvim configs/init.lua && cd -",
|
||||
direction = "float",
|
||||
on_close = function(term)
|
||||
Terminal:close()
|
||||
u.ReloadConfig()
|
||||
end
|
||||
}
|
||||
Terminal:new(
|
||||
{
|
||||
cmd = "cd $HOME/.dotfiles && nvim configs/init.lua && cd -",
|
||||
direction = "float",
|
||||
on_close = function(term)
|
||||
Terminal:close()
|
||||
u.ReloadConfig()
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
function _nvimConfig_toggle()
|
||||
nvimConfig:toggle()
|
||||
nvimConfig:toggle()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Leader><C-i>", "<cmd>lua _nvimConfig_toggle()<CR>", {noremap = true, silent = true})
|
||||
|
||||
require("toggleterm").setup {
|
||||
shade_terminals = true
|
||||
shade_terminals = true
|
||||
}
|
||||
|
@@ -87,8 +87,6 @@ lsp.tsserver.setup(
|
||||
init_options = require("nvim-lsp-ts-utils").init_options,
|
||||
--
|
||||
on_attach = function(client, bufnr)
|
||||
vim.notify("Eyyyy")
|
||||
|
||||
-- defaults
|
||||
ts_utils.setup(
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@ return require("packer").startup(
|
||||
-- Theming Section
|
||||
-- use 'folke/tokyonight.nvim'
|
||||
use "EdenEast/nightfox.nvim"
|
||||
use "xiyaowong/nvim-transparent"
|
||||
-- use "xiyaowong/nvim-transparent"
|
||||
|
||||
-- Layout Plugins
|
||||
use "kyazdani42/nvim-web-devicons"
|
||||
|
Reference in New Issue
Block a user