Browse Source

include `package-lock.json` & `package.json` in root patterns (#1133)

* Just adds package.json and package-lock.json for the root patterns of
  vim-rooter

* The other ones are the default patterns, see `:help g:rooter_patterns`
Rafael 4 years ago
parent
commit
0a16235cec
1 changed files with 10 additions and 0 deletions
  1. 10 0
      lua/plugins.lua

+ 10 - 0
lua/plugins.lua

@@ -140,6 +140,16 @@ return {
     "airblade/vim-rooter",
     config = function()
       vim.g.rooter_silent_chdir = 1
+      vim.g.rooter_patterns = {
+        ".git",
+        "_darcs",
+        ".hg",
+        ".bzr",
+        ".svn",
+        "Makefile",
+        "package.json",
+        "package-lock.json",
+      }
       if lvim.builtin.rooter.on_config_done then
         lvim.builtin.rooter.on_config_done()
       end