aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorOxbian <got.dacs@slmail.me>2023-08-08 14:02:22 +0200
committerOxbian <got.dacs@slmail.me>2023-08-08 14:02:22 +0200
commit317950a3b6af900031db32b9e9e74723dce59e19 (patch)
treed57d87f753c36705bd030e752f0b6bc05c0a2b9e /vim/after
parent73bd0c0c7c4644502082e8f7f9fd6943f989cf99 (diff)
downloadvimrc-317950a3b6af900031db32b9e9e74723dce59e19.tar.gz
vimrc-317950a3b6af900031db32b9e9e74723dce59e19.zip
Updating folder configuration to use .config
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/markdown.vim1
-rw-r--r--vim/after/ftplugin/python.vim30
2 files changed, 31 insertions, 0 deletions
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
new file mode 100644
index 0000000..bcda2dd
--- /dev/null
+++ b/vim/after/ftplugin/markdown.vim
@@ -0,0 +1 @@
+setlocal spell
diff --git a/vim/after/ftplugin/python.vim b/vim/after/ftplugin/python.vim
new file mode 100644
index 0000000..41b1d88
--- /dev/null
+++ b/vim/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>
+
ArKa projects. All rights to me, and your next child right arm.