summary refs log tree commit diff
path: root/.vim/lua
diff options
context:
space:
mode:
Diffstat (limited to '.vim/lua')
-rw-r--r--.vim/lua/plugins.lua10
-rw-r--r--.vim/lua/plugins/_completion.lua2
-rw-r--r--.vim/lua/plugins/_goyo.lua15
-rw-r--r--.vim/lua/plugins/_lsp.lua2
4 files changed, 19 insertions, 10 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index ead7e23..a0fac91 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -1,8 +1,13 @@
 -- load by calling `lua require('plugins')` from your init.vim
-local cmd = vim.cmd
 local g = vim.g
 local u = require('utils')
 
+-- local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
+-- if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
+--   vim.fn.system({ 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path })
+--   vim.api.nvim_command 'packadd packer.nvim'
+-- end
+
 function disable_distribution_plugins()
   g.loaded_gzip              = 1
   g.loaded_tar               = 1
@@ -147,8 +152,9 @@ return require'packer'.startup(function()
 
   -- multi-language support with lazy loading
   -- NOTE: put language specific plugs before this to avoid conflicsts
+  g.polyglot_disabled = { 'autoindent' }
   use {'sheerun/vim-polyglot'}
-    
+
   -- minimal ux
   use {'junegunn/goyo.vim',
     cmd = 'Goyo',
diff --git a/.vim/lua/plugins/_completion.lua b/.vim/lua/plugins/_completion.lua
index 504ab00..59773a2 100644
--- a/.vim/lua/plugins/_completion.lua
+++ b/.vim/lua/plugins/_completion.lua
@@ -16,7 +16,7 @@ g.completion_sorting = 'length' -- or: alphabet, none
 
 g.completion_auto_change_source = true
 g.completion_chain_complete_list = {
-  {complete_items = {'lsp', 'snippet', 'buffers', 'path', 'ts'}},
+  {complete_items = {'lsp', 'snippet', 'path', 'buffers', 'ts'}},
   -- {mode = '<c-p>'},
   -- {mode = '<c-n>'},
   {mode = 'file'},
diff --git a/.vim/lua/plugins/_goyo.lua b/.vim/lua/plugins/_goyo.lua
index e18d2ba..538712d 100644
--- a/.vim/lua/plugins/_goyo.lua
+++ b/.vim/lua/plugins/_goyo.lua
@@ -1,9 +1,12 @@
 vim.g.goyo_width = 120
 vim.g.goyo_height = 90
 vim.g.goyo_linenr = false
-require('utils').augroup('goyo_hooks', {
-  {'User', 'GoyoEnter', 'set laststatus=0 scrolloff=999'},
-  {'User', 'GoyoEnter', 'Limelight'},
-  {'User', 'GoyoLeave', 'set laststatus=2 scrolloff=5'},
-  {'User', 'GoyoLeave', 'Limelight!'},
-})
+
+require('utils').augroup2 {
+  goyo_hooks = {
+    {'User', 'GoyoEnter', 'set laststatus=0 scrolloff=999'},
+    {'User', 'GoyoEnter', 'Limelight'},
+    {'User', 'GoyoLeave', 'set laststatus=2 scrolloff=5'},
+    {'User', 'GoyoLeave', 'Limelight!'},
+  }
+}
diff --git a/.vim/lua/plugins/_lsp.lua b/.vim/lua/plugins/_lsp.lua
index e8ca981..bf1cc6d 100644
--- a/.vim/lua/plugins/_lsp.lua
+++ b/.vim/lua/plugins/_lsp.lua
@@ -22,7 +22,7 @@ local my_attach = function(client)
   nnoremap { '<leader>f', function() vim.lsp.buf.formatting() end }
 
   -- nnoremap { 'g0', function() vim.lsp.buf.document_symbol() end }
-  -- nnoremap { 'gr', function() vim.lsp.buf.references() end }
+  nnoremap { 'gR', function() vim.lsp.buf.references() end }
   nnoremap { 'gW', function() vim.lsp.buf.workspace_symbol() end }
   nnoremap { 'gD', function() vim.lsp.buf.declaration() end }
   nnoremap { 'gT', function() vim.lsp.buf.type_definition() end }