diff options
author | Vitor Gonçalves <vitorg@tilde.team> | 2024-01-24 03:31:49 -0300 |
---|---|---|
committer | Vitor Gonçalves <vitorg@tilde.team> | 2024-01-24 03:31:49 -0300 |
commit | b9fafe3d854673faf80f7e6c5c628c4ae8ae9290 (patch) | |
tree | c354211378560b795cb2b03d546fddaccc9d0057 | |
parent | 9d2d778f4f6fc334878001e7ab70308cdd7663ce (diff) | |
download | dots-b9fafe3d854673faf80f7e6c5c628c4ae8ae9290.tar.gz |
nvim: major updates, init.lua and gruvbox finally
-rw-r--r-- | .config/nvim/init.lua | 61 | ||||
-rw-r--r-- | .config/nvim/init.vim | 55 | ||||
m--------- | .config/nvim/pack/plugins/start/gruvbox | 0 | ||||
-rw-r--r-- | .gitmodules | 6 |
4 files changed, 67 insertions, 55 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..42b0544 --- /dev/null +++ b/.config/nvim/init.lua @@ -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 = "," + diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index 58f2798..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -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=',' - diff --git a/.config/nvim/pack/plugins/start/gruvbox b/.config/nvim/pack/plugins/start/gruvbox new file mode 160000 +Subproject f1ecde848f0cdba877acb0c740320568252cc48 diff --git a/.gitmodules b/.gitmodules index 9494896..12b9b80 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,9 @@ [submodule ".config/zsh/plugins/zsh-syntax-highlighting"] path = .config/zsh/plugins/zsh-syntax-highlighting 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 |