mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(lang): add zig support
This commit is contained in:
parent
f8268faa7c
commit
36cd3114a7
1 changed files with 68 additions and 0 deletions
68
lua/lazyvim/plugins/extras/lang/zig.lua
Normal file
68
lua/lazyvim/plugins/extras/lang/zig.lua
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"NTBBloodbath/zig-tools.nvim",
|
||||||
|
ft = "zig",
|
||||||
|
config = function()
|
||||||
|
require("zig-tools").setup()
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
module_pattern = "plenary.*",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ziglang/zig.vim",
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
if type(opts.ensure_installed) == "table" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "zig" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
if type(opts.ensure_installed) == "table" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "zls", "codelldb" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
zls = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup = {
|
||||||
|
zls = function(_, opts)
|
||||||
|
local zig_tools_opts = require("lazyvim.util").opts("zig-tools.nvim")
|
||||||
|
require("zig-tools").setup(vim.tbl_deep_extend("force", zig_tools_opts or {}, { server = opts }))
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
optional = true,
|
||||||
|
dependencies = {
|
||||||
|
"lawrence-laz/neotest-zig",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
adapters = {
|
||||||
|
["neotest-zig"] = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue