Compare commits
No commits in common. "a6cc2b8638863d9818a844b1eac99673af9cf9a0" and "bf0f34cbaf309f8dbc2476690b5d7fe5d350d7f2" have entirely different histories.
a6cc2b8638
...
bf0f34cbaf
|
@ -12,9 +12,9 @@ cmp.setup({
|
|||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
},
|
||||
|
@ -25,40 +25,30 @@ cmp.setup({
|
|||
mapping = cmp.mapping.preset.insert({
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if require'snippy'.can_expand_or_advance() then
|
||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||
if vim.fn["vsnip#jumpable"](1) == 1 then
|
||||
feedkey("<Plug>(vsnip-jump-next)", "")
|
||||
elseif cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Insert })
|
||||
end
|
||||
elseif require'snippy'.can_expand_or_advance() then
|
||||
require'snippy'.expand_or_advance()
|
||||
else
|
||||
fallback()
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if require'snippy'.can_expand_or_advance() then
|
||||
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
|
||||
else
|
||||
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
|
||||
['<S-Tab>'] = cmp.mapping(function()
|
||||
if vim.fn["vsnip#jumpable"](1) == 1 then
|
||||
feedkey("<Plug>(vsnip-jump-next)", "")
|
||||
elseif cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
end
|
||||
elseif require'snippy'.can_jump(-1) then
|
||||
require'snippy'.previous()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
end, { "i", "s"}),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
-- { name = 'vsnip' }, -- For vsnip users.
|
||||
{ name = 'vsnip' }, -- For vsnip users.
|
||||
-- { name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||
{ name = 'snippy' }, -- For snippy users.
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
|
@ -114,7 +104,7 @@ require("mason").setup {
|
|||
}
|
||||
}
|
||||
require("mason-lspconfig").setup {
|
||||
ensure_installed = { "pyright", "texlab", "clangd", "bashls", "cmake", "jsonls", "tsserver", "vuels", "dockerls", "vimls", "html", "yamlls", "cssls", "lua_ls", "ltex", "gopls", "rust_analyzer", "jdtls", "emmet_ls" },
|
||||
ensure_installed = { "pyright", "texlab", "clangd", "bashls", "cmake", "jsonls", "tsserver", "vuels", "dockerls", "vimls", "html", "yamlls", "cssls", "lua_ls", "ltex", "gopls", "rust_analyzer", "jdtls"},
|
||||
}
|
||||
|
||||
require('lspconfig').pyright.setup {
|
||||
|
@ -189,18 +179,6 @@ require('lspconfig').html.setup {
|
|||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').emmet_ls.setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue" },
|
||||
init_options = {
|
||||
html = {
|
||||
options = {
|
||||
["bem.enabled"] = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
require('lspconfig').yamlls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ require('lazy').setup({
|
|||
{"folke/trouble.nvim", dependencies = {"nvim-tree/nvim-web-devicons"}},
|
||||
{"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"},
|
||||
{"NeogitOrg/neogit", dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "sindrets/diffview.nvim"}, config = true},
|
||||
{'hrsh7th/nvim-cmp', dependencies = {'hrsh7th/cmp-buffer', 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', 'dcampos/nvim-snippy', 'honza/vim-snippets','dcampos/cmp-snippy' }},
|
||||
{'hrsh7th/nvim-cmp', dependencies = {'hrsh7th/cmp-buffer', 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', 'hrsh7th/vim-vsnip', 'hrsh7th/vim-vsnip-integ'}},
|
||||
{'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons', opt = true }},
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' },
|
||||
{'nvim-telescope/telescope.nvim', dependencies = {'nvim-lua/plenary.nvim'}},
|
||||
|
|
Loading…
Reference in New Issue