summaryrefslogtreecommitdiff
path: root/init.vim
blob: b29b3169c752028b39bd6c8115539d94211bb16f (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
call plug#begin()
" LSP Support
Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/mason.nvim', { 'do':':MasonUpdate' }
Plug 'williamboman/mason-lspconfig.nvim'
" Autocompletion
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-nvim-lua'
" Snippets
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip'

" Formatter
Plug 'sbdchd/neoformat'
Plug 'mhartington/formatter.nvim'

" Tutor
Plug 'ThePrimeagen/vim-be-good'

" Colorscheme
Plug 'bluz71/vim-moonfly-colors'

" File Browsers
Plug 'nvim-lua/plenary.nvim'
Plug 'MunifTanjim/nui.nvim'
Plug 'nvim-tree/nvim-web-devicons'
Plug 'nvim-neo-tree/neo-tree.nvim', { 'branch': 'v2.x' }
Plug 'mcchrish/nnn.vim'

" Git
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'

" Linter
Plug 'dense-analysis/ale'
" Godot Mono tools
Plug 'habamax/vim-godot'
Plug 'OmniSharp/omnisharp-vim'
call plug#end()

" Vanilla settings
set termguicolors
set number
set relativenumber
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set cc=100

" Custom colorscheme
colorscheme moonfly

" Neo-tree
let g:neo_tree_remove_legacy_commands = 1
nnoremap \ :Neotree reveal toggle<CR>

" ALE settings
"let g:ale_completion_enabled = 0
"let g:ale_completion_autoimport = 1

" Define linter for C#
let g:ale_linters = {
\	'cs': ['OmniSharp']
\}

" Define linter for GDScript
"call ale#linter#Define('gdscript', {
"\	'name': 'godot',
"\	'lsp': 'socket',
"\	'address': '127.0.0.1:6005',
"\	'project_root': 'project.godot',
"\})

" Neoformat settings
let g:neoformat_enabled_cs = [ 'csharpier' ]
augroup fmt
  autocmd!
  autocmd BufWritePre *.cs undojoin | Neoformat
augroup END

augroup git 
    au!
    au BufWritePost * silent Git status 
augroup END

" NNN settings
let g:nnn#command = 'nnn -H'

" OmniSharp settings
let g:OmniSharp_popup_position = 'peek'
if has('nvim')
  let g:OmniSharp_popup_options = {
  \ 'winblend': 30,
  \ 'winhl': 'Normal:Normal,FloatBorder:ModeMsg',
  \ 'border': 'rounded'
  \}
else
  let g:OmniSharp_popup_options = {
  \ 'highlight': 'Normal',
  \ 'padding': [0],
  \ 'border': [1],
  \ 'borderchars': ['─', '│', '─', '│', '╭', '╮', '╯', '╰'],
  \ 'borderhighlight': ['ModeMsg']
  \}
endif
let g:OmniSharp_popup_mappings = {
\ 'sigNext': '<C-n>',
\ 'sigPrev': '<C-p>',
\ 'pageDown': ['<C-f>', '<PageDown>'],
\ 'pageUp': ['<C-b>', '<PageUp>']
\}

lua package.loaded["init"] = nil
lua require("init")