feat(nvim): better attach azure pipelines ls for azure pipeline files
This commit is contained in:
parent
da961e5808
commit
dc77098877
4
dots/.config/nvim/after/ftplugin/azure-pipelines.lua
Normal file
4
dots/.config/nvim/after/ftplugin/azure-pipelines.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
local opt_local = vim.opt_local
|
||||||
|
|
||||||
|
opt_local.tabstop = 2
|
||||||
|
opt_local.shiftwidth = 2
|
@ -2,11 +2,18 @@ local M = {}
|
|||||||
|
|
||||||
M.setup = function()
|
M.setup = function()
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
|
filename = {
|
||||||
|
['.dockerignore'] = "dockerignore"
|
||||||
|
},
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*%.dockerfile"] = "dockerfile",
|
[".*%.dockerfile"] = "dockerfile",
|
||||||
[".*%.dockerignore"] = "gitignore",
|
[".*/Azure%-Pipelines/.*%.yml"] = "azure-pipelines",
|
||||||
|
[".*/Azure%-Pipelines/.*%.yaml"] = "azure-pipelines",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.treesitter.language.register("yaml", "azure-pipelines")
|
||||||
|
vim.treesitter.language.register("gitignore", "dockerignore")
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -254,23 +254,15 @@ lspconfig.azure_pipelines_ls.setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
yaml = {
|
yaml = {
|
||||||
schemas = require("schemastore").yaml.schemas({
|
schemas = {
|
||||||
replace = {
|
["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = {
|
||||||
["Azure Pipelines"] = {
|
"*.yml",
|
||||||
description = "Azure Pipelines override",
|
"*.yaml",
|
||||||
fileMatch = {
|
|
||||||
"/azure-pipeline*.y*l",
|
|
||||||
"/*.azure*",
|
|
||||||
"Azure-Pipelines/**/*.y*l",
|
|
||||||
"Pipelines/*.y*l",
|
|
||||||
},
|
|
||||||
name = "Azure Pipelines",
|
|
||||||
url = "https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
filetypes = "azure-pipelines",
|
||||||
capabilities = lsp_capabilities,
|
capabilities = lsp_capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user