浏览代码

bug fix for matchup

Chris 4 年之前
父节点
当前提交
b29ef8fa58
共有 7 个文件被更改,包括 29 次插入15 次删除
  1. 3 2
      init.lua
  2. 15 0
      lua/lsp/efm-general-ls.lua
  3. 1 0
      lua/nv-matchup/init.lua
  4. 1 1
      lua/nv-treesitter/init.lua
  5. 2 2
      lua/nv-utils/init.lua
  6. 6 10
      lua/plugins.lua
  7. 1 0
      lua/settings.lua

+ 3 - 2
init.lua

@@ -14,7 +14,6 @@ else
   require('nv-colorizer')
   require('nv-nvimtree')
   require('nv-treesitter')
-  require('nv-galaxyline')
   require('nv-barbar')
   require('nv-quickscope')
   require('nv-gitsigns')
@@ -28,17 +27,19 @@ else
   require('nv-floaterm')
   require('nv-vim-rooter')
   require('nv-closetag')
+  require('nv-matchup')
   require('nv-lspkind')
   require('nv-hop')
   require('nv-gitblame')
+  require('nv-galaxyline')
 
   -- Which Key (Hope to replace with Lua plugin someday)
   vim.cmd('source ~/.config/nvim/vimscript/nv-whichkey/init.vim')
   vim.cmd('source ~/.config/nvim/vimscript/functions.vim')
---  vim.cmd('source ~/.config/nvim/vimscript/nv-commentary/init.vim')
 
   -- LSP
   require('lsp')
+  require('lsp.efm-general-ls')
   require('lsp.lua-ls')
   require('lsp.bash-ls')
   require('lsp.js-ts-ls')

+ 15 - 0
lua/lsp/efm-general-ls.lua

@@ -0,0 +1,15 @@
+require"lspconfig".efm.setup {
+    init_options = {documentFormatting = true},
+    filetypes = {"lua"},
+    settings = {
+        rootMarkers = {".git/"},
+        languages = {
+            lua = {
+                {
+                    formatCommand = "lua-format -i --no-keep-simple-function-one-line --no-break-after-operator --column-limit=150 --break-after-table-lb",
+                    formatStdin = true
+                }
+            }
+        }
+    }
+}

+ 1 - 0
lua/nv-matchup/init.lua

@@ -0,0 +1 @@
+vim.g.matchup_matchparen_offscreen = {}

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

@@ -14,7 +14,7 @@ require'nvim-treesitter.configs'.setup {
   },
   refactor = {
       highlight_definitions = {
-        enable = true
+        enable = false
       }
    }
 }

+ 2 - 2
lua/nv-utils/init.lua

@@ -30,8 +30,8 @@ nv_utils.define_augroups(
             {'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'},
             {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
             {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
-            {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
-            {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
+            -- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
+            -- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
         },
     }
 )

+ 6 - 10
lua/plugins.lua

@@ -105,19 +105,15 @@ return require('packer').startup(function(use)
   use 'alvan/vim-closetag'
   use { 'glacambre/firenvim', run = function() vim.fn['firenvim#install'](1) end }
   use 'liuchengxu/vim-which-key'
-  use 'tpope/vim-sleuth'
   use 'voldikss/vim-floaterm'
-  use 'phaazon/hop.nvim'
   use 'liuchengxu/vista.vim'
-  -- use { 'npxbr/glow.nvim', run = ':GlowInstall' }
-  -- figure out how to disable or configure for things with tags like <div></div> because it will highlight all divs
-  use 'RRethy/vim-illuminate'
   use 'terrortylor/nvim-comment'
-  --use 'tpope/vim-commentary'
-  --use 'suy/vim-context-commentstring'
-  -- use 'b3nj5m1n/kommentary'
-  use 'andymass/vim-matchup'
-  use 'junegunn/goyo.vim'
   use 'bfredl/nvim-miniyank'
   use 'brooth/far.vim'
+  use 'junegunn/goyo.vim'
+  use 'andymass/vim-matchup'
+  use 'tpope/vim-sleuth'
+  use 'phaazon/hop.nvim'
+  -- use 'RRethy/vim-illuminate'
+  -- use 'b3nj5m1n/kommentary'
 end)

+ 1 - 0
lua/settings.lua

@@ -17,6 +17,7 @@ vim.cmd('set sw=4')                        --Change the number of space characte
 vim.bo.expandtab=true                           --Converts tabs to spaces
 vim.bo.smartindent=true                         --Makes indenting smart
 vim.wo.number = true
+vim.o.laststatus = 2
 vim.wo.cursorline=true                          --Enable highlighting of the current line
 vim.o.showtabline=2                       --Always show tabs
 vim.o.showmode=false                          --We don't need to see things like -- INSERT -- anymore