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 /lua | |
| parent | 2e14d21aa4f9c92ae78d540e277988304418cbd0 (diff) | |
| download | nvim-conf-2f65f4524a084967572dce8277098ff71555b740.tar.gz nvim-conf-2f65f4524a084967572dce8277098ff71555b740.zip | |
add snippets, fix comp
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/alpha/init.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/snippets.lua | 18 | ||||
| -rw-r--r-- | lua/plugins.lua | 32 |
3 files changed, 50 insertions, 1 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 = { |