-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.lua
More file actions
82 lines (72 loc) · 1.73 KB
/
settings.lua
File metadata and controls
82 lines (72 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
vim.opt.relativenumber = true
vim.opt.nu = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes:2"
vim.opt.colorcolumn = "80,120"
vim.opt.tabline = '%!v:lua.require(\'myutils\').my_tab_line()'
vim.cmd.colorscheme("catppuccin-mocha")
vim.lsp.config('*', {
capabilities = {
textDocument = {
semanticTokens = {
multilineTokenSupport = true,
}
},
offsetEncoding = { 'utf-16' },
general = {
positionEncodings = { 'utf-16' },
},
},
root_markers = { '.git' },
})
vim.lsp.config('basedpyright', {
cmd = { 'uvx', '--from', 'basedpyright', 'basedpyright-langserver', '--stdio' },
settings = {
basedpyright = {
analysis = {
diagnosticMode = "openFilesOnly",
},
typeCheckingMode = "basic"
}
},
root_markers = { "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", "pyrightconfig.json", ".git", ".venv" }
})
vim.lsp.config('pylsp', {
cmd = { 'uvx', '--from', 'python-lsp-server[rope]', '--with', 'python-lsp-black', 'pylsp' },
settings = {
pylsp = {
plugins = {
black = {
enabled = true
}
}
}
}
})
vim.lsp.config('ruff', {
cmd = { 'uvx', 'ruff', 'server' },
})
vim.lsp.config('pyrefly', {
cmd = { 'uvx', 'pyrefly', 'lsp' },
})
local efmls_config = {
-- filetypes = vim.tbl_keys(languages),
settings = {
rootMarkers = { '.git/' },
-- languages = languages,
},
init_options = {
documentFormatting = true,
documentRangeFormatting = true,
hover = true,
documentSymbol = true,
codeAction = true,
completion = true
},
}
vim.lsp.config('efm', efmls_config)