1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1
if filereadable('/etc/hostname')
let hostname=join(readfile('/etc/hostname'))
else
let hostname='unknown'
endif
call plug#begin()
Plug 'dylnmc/synstack.vim'
Plug 'folke/trouble.nvim'
Plug 'google/vim-codefmt'
Plug 'google/vim-glaive'
Plug 'google/vim-maktaba'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-nvim-lua'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/vim-vsnip'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'onsails/lspkind.nvim'
Plug 'flazz/vim-colorschemes'
Plug 'nvim-tree/nvim-tree.lua'
Plug 'vim-airline/vim-airline'
Plug 'git://git.josher.dev/fieldmarshal.vim.git'
Plug 'git://git.josher.dev/rneovim-userregs.git'
Plug 'git@git.josher.dev:config.vim.git', { 'dir': g:plug_home . '/config.vim' }
call plug#end()
set termguicolors
set shiftwidth=2
set tabstop=2
set expandtab
set nowrap
set splitright
set wildmode=longest,list,full
let mapleader=" "
noremap <C-w>% <C-w>v
noremap <C-w>" <C-w>s
noremap Y y$
augroup InitVim
au!
autocmd BufRead *.java,*.c,*.cpp,*.cxx TSBufEnable highlight
augroup END
noremap รบ <cmd>FormatCode<cr>
noremap <leader>p <plug>(SynStack)
" Local configuration that can be set by hostname or just a local
" configuration.
if isdirectory(printf('%s/.config/nvim/%s', $HOME, hostname))
exec "set rtp+=" . printf('%s/.config/nvim/%s', $HOME, hostname)
endif
if isdirectory(printf('%s/.config/nvim/local', $HOME))
exec "set rtp+=" . printf('%s/.config/nvim/local', $HOME)
endif
if filereadable(printf('%s/.config/nvim/%s.vim', $HOME, hostname))
exec "source " . printf('%s/.config/nvim/%s.vim', $HOME, hostname)
endif
if filereadable(printf('%s/.config/nvim/local.vim', $HOME))
exec "source " . printf('%s/.config/nvim/local.vim', $HOME)
endif
map <leader>nt <cmd>NvimTreeToggle<cr>
lua << EOF
-- CiderLSP
vim.opt.completeopt = { "menu", "menuone", "noselect" }
require("lsp")
require("lspconfig")
-- Diagnostics
require("diagnostics")
require("nvim-tree").setup()
EOF
|