From e8ffddedef91b5a68b65cddcdf56ddb7f5a15dd8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 1 Mar 2022 15:22:59 +0100 Subject: [PATCH] home: vim: add basic LSP configuration Trying it out with `pyright` for now. --- home/vim/plugin/settings/lspconfig.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 home/vim/plugin/settings/lspconfig.vim diff --git a/home/vim/plugin/settings/lspconfig.vim b/home/vim/plugin/settings/lspconfig.vim new file mode 100644 index 0000000..46c82a6 --- /dev/null +++ b/home/vim/plugin/settings/lspconfig.vim @@ -0,0 +1,11 @@ +lua << EOF +local lsp = require("lspconfig") +local utils = require("ambroisie.utils") + +-- Python +if utils.is_executable("pyright") then + lsp.pyright.setup({ + on_attach = utils.on_attach, + }) +end +EOF