
## What is this PR for? Refactoring of pickers in LazyVim: - [x] telescope moved to extras - [x] dressing was moved to the telescope extra. Not needed with fzf-lua and noice - [x] when none of the two is enabled, then telescope will be enabled - [x] when using `:LazyExtras` to enable fzf-lua, the telescope spec will never be parsed - [x] when not using `:LazyExras`, the spec will be parsed, but one of the two will be disabled. - [x] only one picker extra can be used to prevent issues - [ ] cleanup lsp keymaps
81 lines
1.8 KiB
Lua
81 lines
1.8 KiB
Lua
return {
|
|
recommended = function()
|
|
return LazyVim.extras.wants({
|
|
ft = { "terraform", "hcl" },
|
|
root = ".terraform",
|
|
})
|
|
end,
|
|
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
opts = { ensure_installed = { "terraform", "hcl" } },
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
opts = {
|
|
servers = {
|
|
terraformls = {},
|
|
},
|
|
},
|
|
},
|
|
-- ensure terraform tools are installed
|
|
{
|
|
"williamboman/mason.nvim",
|
|
opts = { ensure_installed = { "tflint" } },
|
|
},
|
|
{
|
|
"nvimtools/none-ls.nvim",
|
|
optional = true,
|
|
opts = function(_, opts)
|
|
local null_ls = require("null-ls")
|
|
opts.sources = vim.list_extend(opts.sources or {}, {
|
|
null_ls.builtins.formatting.terraform_fmt,
|
|
null_ls.builtins.diagnostics.terraform_validate,
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"mfussenegger/nvim-lint",
|
|
optional = true,
|
|
opts = {
|
|
linters_by_ft = {
|
|
terraform = { "terraform_validate" },
|
|
tf = { "terraform_validate" },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"stevearc/conform.nvim",
|
|
optional = true,
|
|
opts = {
|
|
formatters_by_ft = {
|
|
terraform = { "terraform_fmt" },
|
|
tf = { "terraform_fmt" },
|
|
["terraform-vars"] = { "terraform_fmt" },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"nvim-telescope/telescope.nvim",
|
|
optional = true,
|
|
dependencies = {
|
|
{
|
|
"ANGkeith/telescope-terraform-doc.nvim",
|
|
config = function()
|
|
LazyVim.on_load("telescope.nvim", function()
|
|
require("telescope").load_extension("terraform_doc")
|
|
end)
|
|
end,
|
|
},
|
|
{
|
|
"cappyzawa/telescope-terraform.nvim",
|
|
config = function()
|
|
LazyVim.on_load("telescope.nvim", function()
|
|
require("telescope").load_extension("terraform")
|
|
end)
|
|
end,
|
|
},
|
|
},
|
|
},
|
|
}
|