aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2021-08-23 00:50:27 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2021-08-23 00:50:27 +0200
commit5f8daea1cb65430f7c47adde4ae88946efe45c0f (patch)
treef6ed14dba8e186e25afba8f9d780c0dc13d3e488 /lua/plugins.lua
parent8d8105941690225055023f869a9a2cdd0faf8df5 (diff)
downloadnvim-conf-5f8daea1cb65430f7c47adde4ae88946efe45c0f.tar.gz
nvim-conf-5f8daea1cb65430f7c47adde4ae88946efe45c0f.zip
fix twiglight to include the method_declaration as it used by php
Diffstat (limited to 'lua/plugins.lua')
-rw-r--r--lua/plugins.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 4edbef6..3c635df 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -1,6 +1,7 @@
vim.cmd [[packadd packer.nvim]]
+vim.cmd([[autocmd BufWritePost plugins.lua source <afile> | PackerCompile]])
-return require('packer').startup(function()
+return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use {
@@ -21,9 +22,17 @@ return require('packer').startup(function()
"folke/twilight.nvim",
config = function()
require("twilight").setup {
+ context = 3,
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
+ expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
+ "function",
+ "method_declaration",
+ "method",
+ "table",
+ "if_statement",
+ },
}
end
}