Skip to content

Commit

Permalink
feat: add cue and kcl support (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
silveiralexf committed Oct 21, 2024
1 parent 6478eab commit fbbdeaa
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@


### [2024-10-21]
* [[6478eab]](https://github.com/silveiralexf/.dotfiles/commit/6478eab1af1575f1d75ab28b46a144780373c3a9) chore: remove multicursors plugin (silveiralexf@gmail.com)


* [[28b0e36]](https://github.com/silveiralexf/.dotfiles/commit/28b0e366b5a7f04d0099876c747d0afbe19c2711) chore: bump deps, update dict and add lsp header to taskfile (silveiralexf@gmail.com)


Expand Down
5 changes: 5 additions & 0 deletions nvim/lua/lsp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ return {
'pylsp',
'rust_analyzer',
'svelte',
'taplo',
'terraformls',
'tflint',
'ts_ls',
Expand All @@ -57,6 +58,10 @@ return {
require('lspconfig')[server_name].setup({
capabilities = capabilities,
})
-- HACK: directly forcing install while not yet supported by mason-lspconfig
-- ref to: https://github.com/williamboman/mason-lspconfig.nvim/pull/461
require('lspconfig').kcl.setup({})
require('lspconfig').dagger.setup({})
end,
},
})
Expand Down
14 changes: 14 additions & 0 deletions nvim/lua/lsp/servers/kcl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
{
'neovim/nvim-lspconfig',
config = function()
require('lspconfig').setup({
opts = {
setup = {
kcl = {},
},
},
})
end,
},
}
14 changes: 14 additions & 0 deletions nvim/lua/lsp/servers/toml.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
{
'neovim/nvim-lspconfig',
config = function()
require('lspconfig').setup({
opts = {
setup = {
taplo = {},
},
},
})
end,
},
}
3 changes: 2 additions & 1 deletion nvim/lua/lsp/servers/yaml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ return {
-- Must disable built-in schemaStore support to use
enable = true,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = '',
url = 'https://www.schemastore.org/api/json/catalog.json',
},
schemas = require('schemastore')['yaml-companion'].yaml.schemas({
-- select subset from the JSON schema catalog
Expand All @@ -42,6 +42,7 @@ return {
'kustomization.yaml',
'.*docker-compose.{yml,yaml}',
'*.compose.{yml,yaml}',
'https://www.schemastore.org/api/json/catalog.json',
'https://json.schemastore.org/github-workflow.json',
},

Expand Down
2 changes: 2 additions & 0 deletions nvim/lua/plugins/formatting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ return {
hcl = { 'terraform_fmt' },
html = { 'prettierd' },
java = { 'prettierd' },
cue = { 'cue_fmt' },
dagger = { 'cue_fmt' },
javascript = { 'prettierd' },
javascriptreact = { 'prettierd' },
json = { 'prettierd' },
Expand Down
7 changes: 7 additions & 0 deletions nvim/lua/plugins/kcl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- HACK: directly forcing install while not yet supported by mason-lspconfig
-- ref to: https://github.com/williamboman/mason-lspconfig.nvim/pull/461
return {
{
'kcl-lang/kcl.nvim',
},
}

0 comments on commit fbbdeaa

Please sign in to comment.