From f63208096bd0b5623692839a7091e99008ef5e0a Mon Sep 17 00:00:00 2001 From: Oxbian Date: Thu, 9 May 2024 19:22:20 +0200 Subject: FIX: symlink glitch + removing unused plugins from README --- conf/after/ftplugin/python.vim | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 conf/after/ftplugin/python.vim (limited to 'conf/after/ftplugin/python.vim') 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 ldf +nnoremap ldf :call FormatPythonFile() + -- cgit v1.2.3