diff options
| author | Ariel D'ALessandro <dalessandro.ariel@gmail.com> | 2021-08-20 08:39:56 +0200 |
|---|---|---|
| committer | Ariel D'ALessandro <dalessandro.ariel@gmail.com> | 2021-08-20 08:39:56 +0200 |
| commit | 2f65f4524a084967572dce8277098ff71555b740 (patch) | |
| tree | ec7e6d56e1ee9c50dcb7265d44ca972dcd026b3b | |
| parent | 2e14d21aa4f9c92ae78d540e277988304418cbd0 (diff) | |
| download | nvim-conf-2f65f4524a084967572dce8277098ff71555b740.tar.gz nvim-conf-2f65f4524a084967572dce8277098ff71555b740.zip | |
add snippets, fix comp
| -rw-r--r-- | lua/alpha/init.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/snippets.lua | 18 | ||||
| -rw-r--r-- | lua/plugins.lua | 32 | ||||
| -rw-r--r-- | plugin/lsp.vim | 3 | ||||
| -rw-r--r-- | plugin/packer_compiled.lua | 26 |
5 files changed, 78 insertions, 2 deletions
diff --git a/lua/alpha/init.lua b/lua/alpha/init.lua index c403f8c..d180239 100644 --- a/lua/alpha/init.lua +++ b/lua/alpha/init.lua @@ -1,2 +1,3 @@ require("alpha.telescope") require("alpha.refactoring") +require("alpha.snippets") diff --git a/lua/alpha/snippets.lua b/lua/alpha/snippets.lua new file mode 100644 index 0000000..378fa20 --- /dev/null +++ b/lua/alpha/snippets.lua @@ -0,0 +1,18 @@ +local ls = require"luasnip" +local s = ls.snippet +local sn = ls.snippet_node +local t = ls.text_node +local i = ls.insert_node +local f = ls.function_node +local c = ls.choice_node +local d = ls.dynamic_node + +ls.snippets = { + php = { + s("getter", { + t("/**"), + t(" *"), + t(" *"), + }) + } +} diff --git a/lua/plugins.lua b/lua/plugins.lua index 879f75a..4edbef6 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -35,11 +35,41 @@ return require('packer').startup(function() use { 'neovim/nvim-lspconfig', requires = { - { 'hrsh7th/nvim-compe' }, + { + 'hrsh7th/nvim-compe', + config = function() + require'compe'.setup { + enable = true; + autocomplete = true; + debug = false; + min_lenght = 1; + preselect = 'enable'; + throttle_time = 80; + source_timeout = 200; + resolve_timeout = 800; + incomplete_delay = 400; + max_abbr_width = 100; + max_kind_width = 100; + + source = { + path = true; + buffer = true; + calc = true; + nvim_lsp = true; + nvim_lua = true; + vsnip = false; + ultisnips = false; + luasnip = true; + }; + } + end + }, { 'kabouzeid/nvim-lspinstall' } } } + use 'L3MON4D3/LuaSnip' + use { 'nvim-telescope/telescope.nvim', requires = { diff --git a/plugin/lsp.vim b/plugin/lsp.vim index 00f9103..c411983 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -18,7 +18,8 @@ let g:compe.source.buffer = v:true let g:compe.source.calc = v:true let g:compe.source.nvim_lsp = v:true let g:compe.source.nvim_lua = v:true -let g:compe.source.vsnip = v:true +let g:compe.source.vsnip = v:false +let g:compe.source.luasnip = v:true inoremap <silent><expr> <C-Space> compe#complete() inoremap <silent><expr> <CR> compe#confirm('<CR>') diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index e2f302d..89205df 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -69,6 +69,10 @@ end time([[try_loadstring definition]], false) time([[Defining packer_plugins]], true) _G.packer_plugins = { + LuaSnip = { + loaded = true, + path = "/home/alpha/.local/share/nvim/site/pack/packer/start/LuaSnip" + }, delimitMate = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/delimitMate" @@ -89,7 +93,12 @@ _G.packer_plugins = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/neoformat" }, + ["nightfox.nvim"] = { + loaded = true, + path = "/home/alpha/.local/share/nvim/site/pack/packer/start/nightfox.nvim" + }, ["nvim-compe"] = { + config = { "\27LJ\1\2µ\2\0\0\3\0\6\0\t4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0003\2\4\0:\2\5\1>\0\2\1G\0\1\0\vsource\1\0\b\14ultisnips\1\rnvim_lua\2\rnvim_lsp\2\vbuffer\2\nvsnip\1\tcalc\2\fluasnip\2\tpath\2\1\0\v\20resolve_timeout\3 \6\19source_timeout\3È\1\14preselect\venable\ndebug\1\17autocomplete\2\19max_abbr_width\3d\21incomplete_delay\3�\3\19max_kind_width\3d\18throttle_time\3P\15min_lenght\3\1\venable\2\nsetup\ncompe\frequire\0" }, loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/nvim-compe" }, @@ -113,6 +122,10 @@ _G.packer_plugins = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/nvim-treesitter-refactor" }, + ["nvim-treesitter-textobjects"] = { + loaded = true, + path = "/home/alpha/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects" + }, ["nvim-web-devicons"] = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/nvim-web-devicons" @@ -145,6 +158,11 @@ _G.packer_plugins = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/telescope.nvim" }, + ["twilight.nvim"] = { + config = { "\27LJ\1\2:\0\0\2\0\3\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0002\1\0\0>\0\2\1G\0\1\0\nsetup\rtwilight\frequire\0" }, + loaded = true, + path = "/home/alpha/.local/share/nvim/site/pack/packer/start/twilight.nvim" + }, ["vim-blade"] = { loaded = true, path = "/home/alpha/.local/share/nvim/site/pack/packer/start/vim-blade" @@ -246,6 +264,14 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Config for: twilight.nvim +time([[Config for twilight.nvim]], true) +try_loadstring("\27LJ\1\2:\0\0\2\0\3\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0002\1\0\0>\0\2\1G\0\1\0\nsetup\rtwilight\frequire\0", "config", "twilight.nvim") +time([[Config for twilight.nvim]], false) +-- Config for: nvim-compe +time([[Config for nvim-compe]], true) +try_loadstring("\27LJ\1\2µ\2\0\0\3\0\6\0\t4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0003\2\4\0:\2\5\1>\0\2\1G\0\1\0\vsource\1\0\b\14ultisnips\1\rnvim_lua\2\rnvim_lsp\2\vbuffer\2\nvsnip\1\tcalc\2\fluasnip\2\tpath\2\1\0\v\20resolve_timeout\3 \6\19source_timeout\3È\1\14preselect\venable\ndebug\1\17autocomplete\2\19max_abbr_width\3d\21incomplete_delay\3�\3\19max_kind_width\3d\18throttle_time\3P\15min_lenght\3\1\venable\2\nsetup\ncompe\frequire\0", "config", "nvim-compe") +time([[Config for nvim-compe]], false) -- Command lazy-loads time([[Defining lazy-load commands]], true) |