-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlsp.lua
More file actions
153 lines (144 loc) · 4.12 KB
/
Copy pathlsp.lua
File metadata and controls
153 lines (144 loc) · 4.12 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
--------------------------------------------------------------------------------
-- LSP
--------------------------------------------------------------------------------
vim.api.nvim_create_autocmd('User', {
pattern = 'PackerComplete', -- Fallback or custom event if needed, but let's use a more standard one
callback = function()
-- This is where we would put it if we had a specific event.
-- Since we're using VimEnter, let's use that instead.
end,
})
-- Let's use a simple function and schedule it to run after plugins
vim.schedule(function()
vim.lsp.config('*', {
capabilities = require('blink.cmp').get_lsp_capabilities(),
})
-- ts_ls
vim.lsp.config('ts_ls', {
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = 'all',
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
},
})
vim.lsp.enable('ts_ls')
vim.lsp.enable('html')
vim.lsp.enable('cssls')
vim.lsp.config('tailwindcss', {
filetypes = {
'astro',
'blade',
'edge',
'ejs',
'erb',
'gohtml',
'gohtmltmpl',
'handlebars',
'hbs',
'html',
'jade',
'leaf',
'liquid',
'markdown',
'mdx',
'mustache',
'nunjucks',
'php',
'razor',
'slim',
'twig',
'css',
'less',
'postcss',
'sass',
'scss',
'stylus',
'sugarss',
'javascript',
'javascriptreact',
'rescript',
'typescript',
'typescriptreact',
'vue',
'svelte',
'templ',
},
})
vim.lsp.enable('tailwindcss')
-- rust
vim.lsp.config('rust_analyzer', {
settings = {
['rust-analyzer'] = {
diagnostics = {
enable = true,
experimental = { enable = true },
},
},
},
})
vim.lsp.enable('rust_analyzer')
-- lua
vim.lsp.config('lua_ls', {
settings = {
Lua = {
diagnostics = {
disable = {
'missing-fields',
'undefined-global',
},
},
},
},
})
vim.lsp.enable('lua_ls')
-- python
vim.lsp.config('basedpyright', {
settings = {
basedpyright = {
inlayHints = true,
analysis = {
diagnosticSeverityOverrides = {
reportUnusedImport = 'none',
reportUnusedVariable = 'none',
reportAttributeAccessIssue = 'none',
reportUnusedClass = 'none',
reportUnusedFunction = 'none',
reportDuplicateImport = 'none',
reportArgumentType = 'error',
},
typeCheckingMode = 'standard',
},
},
},
})
vim.lsp.enable('basedpyright')
-- bash
vim.lsp.config('bashls', {
settings = {
bashIde = {
shellcheckArguments = {
'--exclude=SC1090,SC1091,SC2076,SC2164',
},
},
},
})
vim.lsp.enable('bashls')
-- cpp
vim.lsp.config('clangd', {
cmd = {
'clangd',
'--fallback-style=llvm',
'--header-insertion=iwyu',
'-j=4',
},
})
vim.lsp.enable('clangd')
end)