[nvim] add ALE

This commit is contained in:
odrling 2021-02-23 00:42:19 +01:00
parent bafece85d9
commit 6bd94943ad
4 changed files with 22 additions and 10 deletions

View file

@ -1,17 +1,15 @@
{
"python.pythonPath": "~/.venv/bin/python",
"diagnostic.displayByAle": true,
"python.pythonPath": "python",
"python.linting.flake8Enabled": true,
"python.analysis.autoSearchPaths": true,
"python.analysis.typeCheckingMode": "basic",
"languageserver": {
"ocaml": {
"command": "ocaml-language-server",
"args": ["--stdio"],
"filetypes": ["ocaml", "reason"]
},
"bash": {
"command": "bash-language-server",
"args": ["start"],
"filetypes": ["sh"],
"ignoredRootPaths": ["~"]
},
"clangd": {
"command": "clangd",
"args": ["--background-index"],

View file

@ -11,6 +11,9 @@ filetype indent on
set path+=**
set wildmenu
" disable ale lsp
let g:ale_disable_lsp = 1
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
@ -149,9 +152,9 @@ fun! CleanExtraSpaces()
call setreg('/', old_query)
endfun
if has("autocmd")
autocmd BufWritePre *.txt,*.c,*.js,*.py,*.java,*.wiki,*.sh,*.coffee,*.adb,*ads :call CleanExtraSpaces()
endif
" if has("autocmd")
" autocmd BufWritePre *.txt,*.c,*.js,*.py,*.java,*.wiki,*.sh,*.coffee,*.adb,*ads :call CleanExtraSpaces()
" endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -210,6 +213,7 @@ nnoremap <leader>gd :vertical Gdiff<cr>
autocmd FileType python map #! ggi#!/usr/bin/env python3<CR><ESC>:silent exec "!chmod +x %"<CR>
autocmd FileType python map ;m oif __name__ == '__main__':<CR>main()<ESC>^
autocmd FileType python map <C-i> :w<CR>:silent exec "!isort %"<CR>:e %<CR>
autocmd FileType python map <leader>o :CocCommand pyright.organizeimports<CR>
" javathings
autocmd FileType java ab sop System.out.print
@ -288,3 +292,9 @@ source ~/.vim/coc.conf.vim
colorscheme space_vim_theme
" Load all plugins now.
" Plugins need to be added to runtimepath before helptags can be generated.
packloadall
" Load all of the helptags now, after plugins have been loaded.
" All messages and errors will be ignored.
silent! helptags ALL

3
.gitmodules vendored
View file

@ -91,3 +91,6 @@
[submodule ".aegisub/automation/0x539"]
path = .aegisub/automation/0x539
url = https://github.com/The0x539/Aegisub-Scripts.git
[submodule ".local/share/nvim/site/pack/ale/start/ale"]
path = .local/share/nvim/site/pack/ale/start/ale
url = git@github.com:dense-analysis/ale.git

@ -0,0 +1 @@
Subproject commit 90b9597d500c528d46aa13ccfa678a86ef7ea22b