feat(pyright): better defaults

This commit is contained in:
Matt Leong 2022-02-17 16:10:16 -08:00
parent 34e827fd05
commit bfaee95d02
3 changed files with 10 additions and 2 deletions

View file

@ -28,7 +28,7 @@ function M.on_attach(client, bufnr)
vim.cmd(([[
augroup CosmicFormat
autocmd!
autocmd BufWritePre %s lua vim.lsp.buf.formatting_sync(nil, 2000)
autocmd BufWritePre %s lua vim.lsp.buf.formatting_sync(nil, 3000)
augroup end
]]):format(format_filetypes))
end

View file

@ -19,6 +19,15 @@ local function get_python_path(workspace)
end
return {
settings = {
python = {
analysis = {
typeCheckingMode = 'off',
useLibraryCodeForTypes = true,
completeFunctionParens = true,
},
},
},
before_init = function(_, config)
config.settings.python.pythonPath = get_python_path(config.root_dir)
end,

View file

@ -41,7 +41,6 @@ local opts_vertical = {
local opts_flex = {
layout_strategy = 'flex',
results_title = false,
layout_config = {
width = 0.7,
height = 0.7,