nvim: major updates, init.lua and gruvbox finally
This commit is contained in:
parent
9d2d778f4f
commit
b9fafe3d85
|
@ -0,0 +1,61 @@
|
||||||
|
local opt = vim.opt
|
||||||
|
local var = vim.g
|
||||||
|
local key = vim.keymap
|
||||||
|
|
||||||
|
-- tabs
|
||||||
|
opt.tabstop = 4
|
||||||
|
opt.softtabstop = 4
|
||||||
|
opt.shiftwidth = 4
|
||||||
|
opt.expandtab = true
|
||||||
|
opt.smartindent = true
|
||||||
|
|
||||||
|
-- search
|
||||||
|
opt.showmatch = true
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.smartcase = true
|
||||||
|
|
||||||
|
opt.swapfile = false -- noswapfile
|
||||||
|
|
||||||
|
opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
opt.undofile = true -- persistent undo
|
||||||
|
|
||||||
|
vim.cmd("syntax on")
|
||||||
|
opt.termguicolors = true
|
||||||
|
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
opt.numberwidth = 2
|
||||||
|
opt.cursorline = true
|
||||||
|
|
||||||
|
opt.background = "dark"
|
||||||
|
var.gruvbox_improved_warnings = 1
|
||||||
|
vim.cmd("colorscheme gruvbox")
|
||||||
|
vim.cmd([[autocmd VimEnter * hi Normal ctermbg=NONE guibg=NONE]])
|
||||||
|
|
||||||
|
|
||||||
|
-- keybindings
|
||||||
|
var.mapleader = " "
|
||||||
|
var.localleader = " "
|
||||||
|
|
||||||
|
-- splits
|
||||||
|
key.set("n", "<leader>h", "<C-w>h")
|
||||||
|
key.set("n", "<leader>j", "<C-w>j")
|
||||||
|
key.set("n", "<leader>k", "<C-w>k")
|
||||||
|
key.set("n", "<leader>l", "<C-w>l")
|
||||||
|
key.set("n", "<leader>L", ":vs<CR>")
|
||||||
|
key.set("n", "<leader>J", ":sp<CR>")
|
||||||
|
opt.splitright = true
|
||||||
|
opt.splitbelow = true
|
||||||
|
|
||||||
|
key.set("n", "<Esc><Esc>", ":nohlsearch<CR>", { silent = true })
|
||||||
|
key.set("n", "<leader>w", ":w!<CR>")
|
||||||
|
key.set("n", "<leader>W", ":wq!<CR>")
|
||||||
|
|
||||||
|
key.set("t", [[<C-\]], [[<C-\><C-n>]])
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", { pattern=[[html,css]], command = "EmmetInstall" })
|
||||||
|
var.user_emmet_mode = "n"
|
||||||
|
var.user_emmet_install_global = 0
|
||||||
|
var.user_emmet_leader_key = ","
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
set nocompatible
|
|
||||||
|
|
||||||
" inteligent indentation
|
|
||||||
filetype indent plugin on
|
|
||||||
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab smartindent
|
|
||||||
set showmatch ignorecase smartcase
|
|
||||||
set noswapfile
|
|
||||||
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
|
|
||||||
set undofile " persist undo
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
set number relativenumber numberwidth=2 cursorline
|
|
||||||
set conceallevel=3
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
let g:sonokai_style = 'shusia'
|
|
||||||
let g:sonokai_better_performance = 1
|
|
||||||
let g:sonokai_transparent_background = 1
|
|
||||||
colo sonokai
|
|
||||||
|
|
||||||
"" bindings
|
|
||||||
" leader mapping
|
|
||||||
nnoremap <SPACE> <Nop>
|
|
||||||
let mapleader=" "
|
|
||||||
let localleader=" "
|
|
||||||
|
|
||||||
" easy splits
|
|
||||||
nnoremap <leader>h <C-w>h
|
|
||||||
nnoremap <leader>j <C-w>j
|
|
||||||
nnoremap <leader>k <C-w>k
|
|
||||||
nnoremap <leader>l <C-w>l
|
|
||||||
nnoremap <leader>L :vs<CR>
|
|
||||||
nnoremap <leader>J :sp<CR>
|
|
||||||
nnoremap <silent> <Esc><Esc> :nohlsearch<CR>
|
|
||||||
set splitright splitbelow
|
|
||||||
|
|
||||||
" easy write
|
|
||||||
nmap <leader>w :w!<CR>
|
|
||||||
nmap <leader>W :w!<CR>
|
|
||||||
nmap <leader>q :wq!<CR>
|
|
||||||
|
|
||||||
" easy term-mode
|
|
||||||
tnoremap <C-\> <C-\><C-n>
|
|
||||||
|
|
||||||
" emmet
|
|
||||||
let g:user_emmet_mode='n' " only on normal mode, thx
|
|
||||||
let g:user_emmet_install_global = 0
|
|
||||||
autocmd FileType html,css EmmetInstall
|
|
||||||
|
|
||||||
let g:user_emmet_leader_key=','
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit f1ecde848f0cdba877acb0c740320568252cc482
|
|
@ -25,3 +25,9 @@
|
||||||
[submodule ".config/zsh/plugins/zsh-syntax-highlighting"]
|
[submodule ".config/zsh/plugins/zsh-syntax-highlighting"]
|
||||||
path = .config/zsh/plugins/zsh-syntax-highlighting
|
path = .config/zsh/plugins/zsh-syntax-highlighting
|
||||||
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||||
|
[submodule ".config/nvim/pack/plugins/start/gruvbox"]
|
||||||
|
path = .config/nvim/pack/plugins/start/gruvbox
|
||||||
|
url = https://github.com/morhetz/gruvbox
|
||||||
|
[submodule ".config/nvim/pack/plugins/start/vimpeccable"]
|
||||||
|
path = .config/nvim/pack/plugins/start/vimpeccable
|
||||||
|
url = https://github.com/svermeulen/vimpeccable
|
||||||
|
|
Loading…
Reference in New Issue