mirror of
https://github.com/kossLAN/nvim-flake.git
synced 2025-11-05 02:09:49 -05:00
feat: zig lsp
This commit is contained in:
parent
94f0bf1c95
commit
33120b06c2
2 changed files with 20 additions and 0 deletions
19
nvim/ftplugin/zig.lua
Normal file
19
nvim/ftplugin/zig.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
if vim.fn.executable('zls') ~= 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local root_files = {
|
||||
'zls.json',
|
||||
'build.zig',
|
||||
'.git',
|
||||
}
|
||||
|
||||
local lsp = require('user.lsp')
|
||||
|
||||
vim.lsp.start {
|
||||
name = 'zls',
|
||||
cmd = { 'zls' },
|
||||
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
||||
capabilities = lsp.make_client_capabilities(),
|
||||
on_attach = lsp.on_attach,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue