Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Apr 4, 2024
1 parent 19ddfba commit 743772a
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lua/dotvim/bootstrap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ local enabled_packages = {
"extra.languages.rust",
"extra.languages.swift",
"extra.languages.typescript",
"extra.languages.json",
"extra.languages.yaml",
"extra.misc.competitive-programming",
"extra.misc.copilot",
"extra.misc.rime",
Expand Down
37 changes: 37 additions & 0 deletions lua/dotvim/pkgs/extra/languages/json.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---@type dotvim.core.package.PackageOption
return {
name = "extra.languages.json",
deps = {
"coding",
"editor",
"lsp",
"treesitter",
},
plugins = {
{
"nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "json", "jsonc", "jsonnet" })
end
end,
},
{
"b0o/schemastore.nvim",
lazy = true,
},
{
"nvim-lspconfig",
opts = function(_, opts)
opts.servers.opts.jsonls = {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
validate = { enable = true },
},
},
}
end,
},
},
}
43 changes: 43 additions & 0 deletions lua/dotvim/pkgs/extra/languages/yaml.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---@type dotvim.core.package.PackageOption
return {
name = "extra.languages.yaml",
deps = {
"coding",
"editor",
"lsp",
"treesitter",
},
plugins = {
{
"nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "yaml" })
end
end,
},
{
"b0o/schemastore.nvim",
lazy = true,
},
{
"nvim-lspconfig",
opts = function(_, opts)
opts.servers.opts.yamlls = {
settings = {
yaml = {
schemaStore = {
-- You must disable built-in schemaStore support if you want to use
-- this plugin and its advanced options like `ignore`.
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = "",
},
schemas = require("schemastore").yaml.schemas(),
},
},
}
end,
},
},
}
4 changes: 0 additions & 4 deletions lua/dotvim/pkgs/treesitter/plugins/nvim-treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ return {
"ini",
"java",
"javascript",
"json",
"jsonc",
"jsonnet",
"just",
"llvm",
"lua",
Expand Down Expand Up @@ -75,7 +72,6 @@ return {
"vim",
"vimdoc",
"vue",
"yaml",
},
indent = {
enable = false,
Expand Down

0 comments on commit 743772a

Please sign in to comment.