christianchiarulli 4 éve
szülő
commit
5363aa6306
5 módosított fájl, 12 hozzáadás és 14 törlés
  1. 1 0
      init.lua
  2. 2 1
      lua/default-config.lua
  3. 1 1
      lua/lv-treesitter/init.lua
  4. 0 6
      lua/lv-which-key/init.lua
  5. 8 6
      lua/plugins.lua

+ 1 - 0
init.lua

@@ -10,6 +10,7 @@ require('lv-galaxyline')
 require('lv-telescope')
 require('lv-treesitter')
 require('lv-autopairs')
+require('lv-which-key')
 
 -- LSP
 require('lsp')

+ 2 - 1
lua/default-config.lua

@@ -34,7 +34,8 @@ O = {
         colorizer = {active = false},
         numb = {active = false},
         ts_playground = {active = false},
-        indent_line = {active = false}
+        indent_line = {active = false},
+        ts_context_commentstring = {active = false}
 
 
     },

+ 1 - 1
lua/lv-treesitter/init.lua

@@ -8,7 +8,7 @@ require'nvim-treesitter.configs'.setup {
     highlight = {
         enable = O.treesitter.highlight.enabled -- false will disable the whole extension
     },
-    context_commentstring = {enable = true, config = {css = '// %s'}},
+    context_commentstring = {enable = O.plugin.ts_context_commentstring, config = {css = '// %s'}},
     -- indent = {enable = true, disable = {"python", "html", "javascript"}},
     -- TODO seems to be broken
     indent = {enable = {"javascriptreact"}},

+ 0 - 6
lua/lv-which-key/init.lua

@@ -1,6 +1,3 @@
-local M = {}
-
-M.config = function()
     require("which-key").setup {
         plugins = {
             marks = true, -- shows a list of your marks on ' and `
@@ -298,7 +295,4 @@ M.config = function()
     local wk = require("which-key")
     wk.register(mappings, opts)
     -- wk.register(visualMappings, visualOpts)
-end
-
-return M
 

+ 8 - 6
lua/plugins.lua

@@ -33,7 +33,7 @@ return require("packer").startup(function(use)
         end
     }
 
-    use {"hrsh7th/vim-vsnip", event = "InsertCharPre"}
+    use {"hrsh7th/vim-vsnip", event = "InsertEnter"}
     use {"rafamadriz/friendly-snippets", event = "InsertEnter"}
 
     -- Treesitter
@@ -41,7 +41,7 @@ return require("packer").startup(function(use)
 
     use {
         "kyazdani42/nvim-tree.lua",
-        cmd = "NvimTreeToggle",
+        -- cmd = "NvimTreeToggle",
         config = function()
             require("lv-nvimtree").config()
         end
@@ -59,9 +59,6 @@ return require("packer").startup(function(use)
     -- whichkey
     use {
         "folke/which-key.nvim",
-        config = function()
-            require('lv-which-key').config()
-        end
     }
 
     -- Autopairs
@@ -206,10 +203,15 @@ return require("packer").startup(function(use)
         disable = not O.plugin.indent_line.active
     }
 
+    use {
+        'JoosepAlviste/nvim-ts-context-commentstring',
+        event = "BufRead",
+        disable = not O.plugin.ts_context_commentstring.active
+    }
+
     -- use {"nvim-telescope/telescope-fzy-native.nvim", opt = true}
     -- use {"nvim-telescope/telescope-project.nvim", opt = true}
     --     -- comments in context
-    --     use {'JoosepAlviste/nvim-ts-context-commentstring', opt = true}
     --     -- Git extras
     -- Git
     -- use {'tpope/vim-fugitive', opt = true}