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()
|
||||
vim.filetype.add({
|
||||
filename = {
|
||||
['.dockerignore'] = "dockerignore"
|
||||
},
|
||||
pattern = {
|
||||
[".*%.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
|
||||
|
||||
return M
|
||||
|
@ -254,23 +254,15 @@ lspconfig.azure_pipelines_ls.setup({
|
||||
},
|
||||
},
|
||||
yaml = {
|
||||
schemas = require("schemastore").yaml.schemas({
|
||||
replace = {
|
||||
["Azure Pipelines"] = {
|
||||
description = "Azure Pipelines override",
|
||||
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",
|
||||
},
|
||||
schemas = {
|
||||
["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = {
|
||||
"*.yml",
|
||||
"*.yaml",
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = "azure-pipelines",
|
||||
capabilities = lsp_capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user