neovim: add plugins and config from old setup
This commit is contained in:
parent
ea29828771
commit
05a203c066
|
@ -1,6 +1,10 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
coc = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
withPython3 = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
|
||||||
|
@ -11,7 +15,7 @@
|
||||||
neoformat
|
neoformat
|
||||||
|
|
||||||
# Colorscheme
|
# Colorscheme
|
||||||
vim-monokai
|
gruvbox-nvim
|
||||||
|
|
||||||
# Fileexplorer in the sidebar
|
# Fileexplorer in the sidebar
|
||||||
nvim-tree-lua
|
nvim-tree-lua
|
||||||
|
@ -24,13 +28,71 @@
|
||||||
|
|
||||||
# git diff icons on the left sidebar
|
# git diff icons on the left sidebar
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
|
|
||||||
|
# One languagepack to rule them all
|
||||||
|
vim-polyglot
|
||||||
|
|
||||||
|
# blockcomments
|
||||||
|
tcomment_vim
|
||||||
|
|
||||||
|
# Go plugin from fatih
|
||||||
|
vim-go
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set termguicolors
|
set termguicolors
|
||||||
set background=dark
|
set background=dark
|
||||||
set nu
|
set nu
|
||||||
colorscheme monokai
|
colorscheme gruvbox
|
||||||
|
set hlsearch
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set softtabstop=4
|
||||||
|
set expandtab
|
||||||
|
set cursorline
|
||||||
|
let mapleader = ","
|
||||||
|
|
||||||
|
" Autosave when focus is lost
|
||||||
|
:au FocusLost * :wa
|
||||||
|
|
||||||
|
""Hotkeys
|
||||||
|
set pastetoggle=<F10>
|
||||||
|
nnoremap <silent><cr> :nohlsearch<CR>
|
||||||
|
inoremap jj <Esc>
|
||||||
|
|
||||||
|
" Faster tab switching
|
||||||
|
map <Tab> :bnext<cr>
|
||||||
|
map <S-Tab> :bprevious<cr>
|
||||||
|
|
||||||
|
" easier moving of code blocks
|
||||||
|
set hidden
|
||||||
|
vnoremap < <gv
|
||||||
|
vnoremap > >gv
|
||||||
|
|
||||||
|
" Permanent undo history
|
||||||
|
set dir=~/.tmp/
|
||||||
|
set backupdir=~/.tmp/bak
|
||||||
|
if v:version >= 703
|
||||||
|
set undodir=~/.tmp/
|
||||||
|
set undofile
|
||||||
|
set undolevels=100
|
||||||
|
set undoreload=1000
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Diasble polyglot for languages with their own plugin
|
||||||
|
let g:polyglot_disabled = ["go"]
|
||||||
|
|
||||||
|
" vim-go
|
||||||
|
au FileType go nmap <leader>r <Plug>(go-run)
|
||||||
|
au FileType go nmap <leader>b <Plug>(go-build)
|
||||||
|
au FileType go nmap <leader>t <Plug>(go-test)
|
||||||
|
let g:go_highlight_functions = 1
|
||||||
|
let g:go_highlight_methods = 1
|
||||||
|
let g:go_highlight_fields = 1
|
||||||
|
let g:go_highlight_types = 1
|
||||||
|
let g:go_highlight_operators = 1
|
||||||
|
let g:go_highlight_build_constraints = 1
|
||||||
|
|
||||||
lua << EOF
|
lua << EOF
|
||||||
require("bufferline").setup{}
|
require("bufferline").setup{}
|
||||||
require("nvim-tree").setup{}
|
require("nvim-tree").setup{}
|
||||||
|
|
Loading…
Reference in a new issue