diff options
author | Oxbian <got.dacs@slmail.me> | 2024-05-09 19:22:20 +0200 |
---|---|---|
committer | Oxbian <got.dacs@slmail.me> | 2024-05-09 19:22:20 +0200 |
commit | f63208096bd0b5623692839a7091e99008ef5e0a (patch) | |
tree | d20b94de37d451ff498427fa5ff14c9f98cf1bb8 /conf/after | |
parent | 583cee5d527698baebfa1ee4845c1a1ebbcf2453 (diff) | |
download | vimrc-f63208096bd0b5623692839a7091e99008ef5e0a.tar.gz vimrc-f63208096bd0b5623692839a7091e99008ef5e0a.zip |
FIX: symlink glitch + removing unused plugins from README
Diffstat (limited to 'conf/after')
-rw-r--r-- | conf/after/ftplugin/markdown.vim | 1 | ||||
-rw-r--r-- | conf/after/ftplugin/python.vim | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/conf/after/ftplugin/markdown.vim b/conf/after/ftplugin/markdown.vim new file mode 100644 index 0000000..bcda2dd --- /dev/null +++ b/conf/after/ftplugin/markdown.vim @@ -0,0 +1 @@ +setlocal spell diff --git a/conf/after/ftplugin/python.vim b/conf/after/ftplugin/python.vim new file mode 100644 index 0000000..41b1d88 --- /dev/null +++ b/conf/after/ftplugin/python.vim @@ -0,0 +1,30 @@ +" Python +let g:lsp_settings = {} +let g:lsp_settings['pylsp-all'] = + \ { + \ 'workspace_config': {'pylsp-all': { + \ 'configurationSources': ['flake8'], + \ 'plugins': { + \ 'pyflakes' : {'enabled': v:false}, + \ 'flake8': {'enabled': v:true}, + \ 'mypy-ls': {'enabled': v:true, 'live_mode': v:false}, + \ 'pylint': {'enabled': v:true}, + \ 'pydocstyle': {'enabled': v:true}, + \ 'pyls_isort': {'enabled': v:true}, + \ 'autopep8': {'enabled': v:false}, + \ 'yapf': {'enabled': v:false}, + \ 'black': {'enabled': v:true}, + \ } + \ }} + \ } + +" Define a custom function that executes :LspDocumentFormat and :!isort +if !exists('*FormatPythonFile') + function! FormatPythonFile() + silent execute '!black %' + silent execute '!isort %' + endfunction +endif +" Remap the custom function to <leader>ldf +nnoremap <leader>ldf :call FormatPythonFile()<CR> + |