comparison dot_config/nvim/init.vim @ 280:dd8b9d0c0e41

Move lua config to lua.init
author zegervdv <zegervdv@me.com>
date Tue, 25 Aug 2020 09:35:59 +0200
parents 7daae1b70617
children dfd62b5a9962
comparison
equal deleted inserted replaced
279:994e456b145e 280:dd8b9d0c0e41
1143 autocmd FileType python setlocal shiftwidth=4 1143 autocmd FileType python setlocal shiftwidth=4
1144 au FileType python setlocal formatprg=autopep8\ - 1144 au FileType python setlocal formatprg=autopep8\ -
1145 autocmd FileType python setlocal path-=** 1145 autocmd FileType python setlocal path-=**
1146 autocmd Filetype python let b:delimitMate_nesting_quotes = ['"', "'"] 1146 autocmd Filetype python let b:delimitMate_nesting_quotes = ['"', "'"]
1147 augroup END 1147 augroup END
1148 lua << EOF
1149 vim.lsp.set_log_level("debug")
1150 EOF
1151 lua << EOF
1152 require'nvim_lsp'.pyls.setup{
1153 cmd = {"pyls"},
1154 on_attach = require'on_attach'.on_attach
1155 }
1156 EOF
1157 1148
1158 let g:python_highlight_all=1 1149 let g:python_highlight_all=1
1159 " }}} 1150 " }}}
1160 " }}} 1151 " }}}
1161 1152
1281 " augroup fmt 1272 " augroup fmt
1282 " autocmd! 1273 " autocmd!
1283 " autocmd BufWritePre * try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry 1274 " autocmd BufWritePre * try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry
1284 " augroup END 1275 " augroup END
1285 " }}} 1276 " }}}
1286 lua <<EOF
1287 require'nvim-treesitter.configs'.setup {
1288 highlight = {
1289 enable = true,
1290 },
1291 incremental_selection = {
1292 enable = true,
1293 keymaps = {
1294 init_selection = "gnn",
1295 node_incremental = "grn",
1296 scope_incremental = "grc",
1297 node_decremental = "grm",
1298 }
1299 },
1300 refactor = {
1301 smart_rename = {
1302 enable = true,
1303 keymaps = {
1304 smart_rename = "grr",
1305 },
1306 },
1307 navigation = {
1308 enable = true,
1309 keymaps = {
1310 goto_definition = "gnd",
1311 list_definitions = "gnD",
1312 },
1313 },
1314 },
1315 }
1316 EOF
1317 " }}} 1277 " }}}
1318 1278
1319 function! SendOSCClipboard(lines, regtype) 1279 function! SendOSCClipboard(lines, regtype)
1320 call SendViaOSC52(join(a:lines, "\n")) 1280 call SendViaOSC52(join(a:lines, "\n"))
1321 endfunction 1281 endfunction
1331 \ '*': 'tmux save-buffer -', 1291 \ '*': 'tmux save-buffer -',
1332 \ }, 1292 \ },
1333 \ 'cache_enabled': 1, 1293 \ 'cache_enabled': 1,
1334 \ } 1294 \ }
1335 1295
1296 luafile ~/.config/nvim/init.lua
1297
1336 " Load local vimrc 1298 " Load local vimrc
1337 if filereadable($HOME . '/.vimrc.local') 1299 if filereadable($HOME . '/.vimrc.local')
1338 source ~/.vimrc.local 1300 source ~/.vimrc.local
1339 endif 1301 endif
1340 1302