Ver Fonte

just use tf

Chris há 4 anos atrás
pai
commit
9611a50acc
5 ficheiros alterados com 7 adições e 7 exclusões
  1. 0 1
      ftplugin/hcl.lua
  2. 1 0
      ftplugin/tf.lua
  3. 3 3
      lua/core/autocmds.lua
  4. 2 2
      lua/default-config.lua
  5. 1 1
      lua/plugins.lua

+ 0 - 1
ftplugin/hcl.lua

@@ -1 +0,0 @@
-require("lsp").setup "hcl"

+ 1 - 0
ftplugin/tf.lua

@@ -0,0 +1 @@
+require("lsp").setup "tf"

+ 3 - 3
lua/core/autocmds.lua

@@ -36,9 +36,9 @@ lvim.autocommands = {
     -- { "VimLeavePre", "*", "set title set titleold=" },
   },
   _filetypechanges = {
-    { "BufWinEnter", ".tf", "setlocal filetype=hcl" },
-    { "BufRead", "*.tf", "setlocal filetype=hcl" },
-    { "BufNewFile", "*.tf", "setlocal filetype=hcl" },
+    -- { "BufWinEnter", ".tf", "setlocal filetype=terraform" },
+    -- { "BufRead", "*.tf", "setlocal filetype=terraform" },
+    -- { "BufNewFile", "*.tf", "setlocal filetype=terraform" },
     { "BufWinEnter", ".zsh", "setlocal filetype=sh" },
     { "BufRead", "*.zsh", "setlocal filetype=sh" },
     { "BufNewFile", "*.zsh", "setlocal filetype=sh" },

+ 2 - 2
lua/default-config.lua

@@ -851,7 +851,7 @@ lvim.lang = {
       "typescriptreact",
     },
   },
-  hcl = {
+  tf = {
     formatter = {
       exe = "terraform_fmt",
       args = {},
@@ -860,7 +860,7 @@ lvim.lang = {
     lsp = {
       provider = "terraformls",
       setup = {
-        filetypes = { "terraform", "hcl", "tf" },
+        filetypes = { "terraform", "tf" },
         cmd = {
           DATA_PATH .. "/lspinstall/terraform/terraform-ls",
           "serve",

+ 1 - 1
lua/plugins.lua

@@ -150,7 +150,7 @@ return {
     config = function()
       vim.g.rooter_silent_chdir = 1
       vim.g.rooter_patterns = {
-        ".git",
+        ".git/",
         "_darcs",
         ".hg",
         ".bzr",