summaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-03-23 12:47:03 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-03-23 12:47:03 +0300
commitf3e0ffe177b03dc0d0dc2a02fe4c0d37d2b6bfda (patch)
tree3f82fa65aabe85e8ad65d02c20ecc5eca1eee87a /nvim
parentbc43fc6ddaa3dff4664638d8f53caf86196a59fe (diff)
vim
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.vim36
l---------nvim/nvim1
2 files changed, 32 insertions, 5 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
index 5b93952..c5665d7 100644
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -72,9 +72,33 @@ Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'crusoexia/vim-monokai'
Plug 'projekt0n/github-nvim-theme'
-call plug#end()
+Plug 'neovim/nvim-lspconfig'
+Plug 'nvim-treesitter/nvim-treesitter'
+
+Plug 'mfussenegger/nvim-dap'
+Plug 'rcarriga/nvim-dap-ui'
+Plug 'theHamsta/nvim-dap-virtual-text'
+Plug 'ray-x/guihua.lua' " float term, codeaction and codelens gui support
-set number relativenumber
+Plug 'ray-x/go.nvim'
+call plug#end()
+lua <<EOF
+require 'go'.setup({
+ goimport = 'gopls', -- if set to 'gopls' will use golsp format
+ gofmt = 'gopls', -- if set to gopls will use golsp format
+ max_line_len = 120,
+ tag_transform = false,
+ test_dir = '',
+ comment_placeholder = '  ',
+ lsp_cfg = true, -- false: use your own lspconfig
+ lsp_gofumpt = true, -- true: set default gofmt in gopls format to gofumpt
+ lsp_on_attach = true, -- use on_attach from go.nvim
+ dap_debug = true,
+})
+
+local protocol = require'vim.lsp.protocol'
+
+EOF
set nu rnu
set tabstop=4
set shiftwidth=0
@@ -166,8 +190,8 @@ let NERDTreeIgnore = ['_site']
" Buffer handling
nmap L :let &number=1-&number<CR>
-nmap <leader>] :bnext<CR>
-nmap <leader>[ :bprevious<CR>
+nmap <silent> <c-]> :bnext<CR>
+nmap <silent> <c-[> :bprevious<CR>
nmap <leader>bq :bp <BAR> bd #<CR>
nmap <leader>bl :ls<CR>
nmap <leader>0 :set invnumber<CR>
@@ -175,3 +199,7 @@ nmap <leader>0 :set invnumber<CR>
" http://stackoverflow.com/questions/7513380/vim-change-x-function-to-delete-buffer-instead-of-save-quit
cnoreabbrev <expr> x getcmdtype() == ":" && getcmdline() == 'x' ? 'bd' : 'x'
+nmap <silent> <c-k> :wincmd k<CR>
+nmap <silent> <c-j> :wincmd j<CR>
+nmap <silent> <c-h> :wincmd h<CR>
+nmap <silent> <c-l> :wincmd l<CR>
diff --git a/nvim/nvim b/nvim/nvim
deleted file mode 120000
index f767680..0000000
--- a/nvim/nvim
+++ /dev/null
@@ -1 +0,0 @@
-/Users/neonxp/dev/dotfiles/nvim \ No newline at end of file