feat: add zenmode

This commit is contained in:
2023-01-05 17:45:52 +01:00
parent ceb4c7ece2
commit fa712e24b3
5 changed files with 29 additions and 14 deletions

View File

@@ -15,6 +15,13 @@ map("n", "<Leader><leader>", "za", opts)
map("v", ">", ">gv", opts)
map("v", "<", "<gv", opts)
local function zenMode()
vim.cmd("NvimTreeClose");
vim.cmd("NoNeckPain");
end
map("n", "zz", zenMode, opts);
-- LSP Functionality
map("n", "<Leader>n", ":lua vim.diagnostic.goto_next()<CR>", opts)
map("n", "<Leader>p", ":lua vim.diagnostic.goto_prev()<CR>", opts)
@@ -23,7 +30,6 @@ map("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
map("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
map("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true })
map("n", "<Leader>e", "<cmd>lua vim.lsp.buf.hover()<CR>", { silent = true })
map("n", "<Leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
map({ "n", "v" }, "<Leader>c", "<cmd>Lspsaga code_action<CR>", { silent = true })
map({ "n", "v" }, "gr", "<cmd>Lspsaga lsp_finder<CR>", opts)
@@ -64,8 +70,8 @@ map("n", "<A-Right>", ":bnext<CR>", opts)
-- Copy visual selection to keyboard
map("v", "Y", '"+y', opts)
map("n", "<Leader>k", "{", opts)
map("n", "<Leader>j", "}", opts)
map("n", "<Leader-k>", "{", opts)
map("n", "<Leader-j>", "}", opts)
-- Move lines vscode style
map("n", "<A-j>", "<cmd>move +1<CR>", opts)

View File

@@ -2,6 +2,8 @@ local plugins = {
"nvim-lua/plenary.nvim",
---------------------
-- Theming Section --
---------------------
@@ -19,7 +21,11 @@ local plugins = {
--------------------
-- Layout Plugins --
--------------------
{ "shortcuts/no-neck-pain.nvim", cmd = "NoNeckPain", config = true },
{
"stevearc/dressing.nvim",
config = true
},
{
"folke/which-key.nvim",
event = "VimEnter",
@@ -29,7 +35,7 @@ local plugins = {
},
{
"ldelossa/litee.nvim",
command = "InsertEnter",
cmd = "InsertEnter",
dependencies = {
"ldelossa/litee-symboltree.nvim",
"ldelossa/litee-calltree.nvim",
@@ -48,6 +54,7 @@ local plugins = {
},
{
"lewis6991/gitsigns.nvim",
lazy = false,
config = function()
require("gitsigns").setup()
end,
@@ -114,7 +121,7 @@ local plugins = {
---------------
{ "glepnir/lspsaga.nvim",
command = "Lspsaga"
cmd = "Lspsaga"
}, -- better windows for lsp replace, goto definition etc...
{ "VonHeikemen/lsp-zero.nvim",
dependencies = {
@@ -147,7 +154,7 @@ local plugins = {
end },
{
"folke/trouble.nvim",
command = "TroubleToggle",
cmd = "TroubleToggle",
dependencies = "kyazdani42/nvim-web-devicons",
config = function()
require("trouble").setup({})
@@ -161,7 +168,7 @@ local plugins = {
-------------------
-- Autocomplete --
-------------------
{ "tpope/vim-surround", event = "InsertEnter" },
{ "tpope/vim-surround", lazy = false },
{
"nat-418/boole.nvim",
event = "BufReadPre",
@@ -195,7 +202,7 @@ local plugins = {
--------------------
{
"jackMort/ChatGPT.nvim",
command = "ChatGPT",
cmd = "ChatGPT",
config = true,
dependencies = {
"MunifTanjim/nui.nvim",
@@ -222,7 +229,7 @@ local plugins = {
"editorconfig/editorconfig-vim",
{
"michaelb/sniprun",
command = "SnipRun",
event = "BufRead",
config = function()
require("max.configs.sniprun")
end,