some shit

This commit is contained in:
2022-05-13 19:19:05 +02:00
parent d5e4ecdf23
commit 9f61e2bedc
17 changed files with 946 additions and 38 deletions

View File

@@ -22,9 +22,3 @@ augroup SaveManualFolds
au BufWinEnter ?* silent! loadview
augroup END
]]
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function()
vim.lsp.buf.format();
end
})

View File

@@ -31,6 +31,16 @@ map("n", "<C-j>", "<C-w>j", options)
map("n", "<C-k>", "<C-w>k", options)
map("n", "<C-l>", "<C-w>l", options)
map("n", "<Leader>1", "1gt", options)
map("n", "<Leader>2", "2gt", options)
map("n", "<Leader>3", "3gt", options)
map("n", "<Leader>4", "4gt", options)
map("n", "<Leader>0", ":tablast<CR>", options)
-- Handling Splits
map("n", "<C-w>h", ":sp<CR>", remap) -- horizontal
map("n", "<C-w>v", ":vs<CR>", remap) -- vertical
-- Browser like next/previous
map("n", "<A-Left>", ":bprevious<CR>", options);
map("n", "<A-Right>", ":bnext<CR>", options);
@@ -43,8 +53,10 @@ map("v", "Y", '"+y', options)
map("n", "<Leader>k", "{", options)
map("n", "<Leader>j", "}", options)
-- Don't accidently create macros when trying to quit
map('n', 'Q', 'q', {})
-- I dont use macros at the moment, can disable this if i want to
map('v', 'Q', 'q', {})
map('v', 'Q', 'q', {})
map('n', 'q', '<nop>', {})
map('n', 'q', '<nop>', {})
-- Move lines vscode style
@@ -79,6 +91,7 @@ map("n", "<Leader>r", "<cmd>lua require('rest-nvim').run()<CR>", options)
-- Close on q
map("n", "<Leader>q", "<Esc>:q<CR>", options)
map("n", "<Leader><C-q>", "<Esc>:qall<CR>", options)
-- Open Nerdtree
map("n", "<C-n>", ":NvimTreeToggle<CR>", options)

View File

@@ -39,7 +39,7 @@ set.virtualedit = "onemore" -- With This option you can move the cursor one char
set.ignorecase = true -- ignores case when searching
set.smartcase = true -- turns on case sensitive search when letters are capitalized
set.termguicolors = true -- set term gui colors (most terminals support this)
set.laststatus = 2 -- Always display the status line
set.laststatus = 3 -- Always display the status line
set.title = true -- Show current txt that you editing
set.relativenumber = false -- Vims absolute, relative and hybrid line numbers
set.cursorline = false -- Enable highlighting of the current line

View File

@@ -71,6 +71,7 @@ return packer.startup(function(use)
use "williamboman/nvim-lsp-installer"
use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }
-- More IDE like features
use {
'rmagatti/session-lens',
requires = { 'rmagatti/auto-session', 'nvim-telescope/telescope.nvim' },
@@ -78,6 +79,7 @@ return packer.startup(function(use)
require('session-lens').setup({ path_display = { 'shorten' } })
end
}
use { "rcarriga/vim-ultest", requires = { "vim-test/vim-test" }, run = ":UpdateRemotePlugins" }
-- Database Feature
use "tpope/vim-dadbod"