Compare commits
No commits in common. "c42a75128a165eb6efcdfac449373543d1109297" and "c3b799ee24451a5a398251aa6f6ce9eee410442f" have entirely different histories.
c42a75128a
...
c3b799ee24
67
init.lua
67
init.lua
|
@ -27,11 +27,11 @@ function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||||
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[==========[
|
--[[
|
||||||
░█░░░█▀█░▀▀█░█░█░░░░█▀█░█░█░▀█▀░█▄█
|
░█░░░█▀█░▀▀█░█░█░░░░█▀█░█░█░▀█▀░█▄█
|
||||||
░█░░░█▀█░▄▀░░░█░░░░░█░█░▀▄▀░░█░░█░█
|
░█░░░█▀█░▄▀░░░█░░░░░█░█░▀▄▀░░█░░█░█
|
||||||
░▀▀▀░▀░▀░▀▀▀░░▀░░▀░░▀░▀░░▀░░▀▀▀░▀░▀
|
░▀▀▀░▀░▀░▀▀▀░░▀░░▀░░▀░▀░░▀░░▀▀▀░▀░▀
|
||||||
--]==========]
|
]]--
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
|
@ -47,66 +47,3 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
|
|
||||||
--[==========[
|
|
||||||
░█▀█░█░█░▀█▀░█▄█░░░░░█▀▀░█▄█░█▀█
|
|
||||||
░█░█░▀▄▀░░█░░█░█░▄▄▄░█░░░█░█░█▀▀
|
|
||||||
░▀░▀░░▀░░▀▀▀░▀░▀░░░░░▀▀▀░▀░▀░▀░░
|
|
||||||
--]==========]
|
|
||||||
local cmp = require'cmp'
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
-- REQUIRED - you must specify a snippet engine
|
|
||||||
expand = function(args)
|
|
||||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip' }, -- For luasnip users.
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Set configuration for specific filetype.
|
|
||||||
cmp.setup.filetype('gitcommit', {
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline({ '/', '?' }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = 'buffer' }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline(':', {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'path' }
|
|
||||||
}, {
|
|
||||||
{ name = 'cmdline' }
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Set up lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
-- https://github.com/hrsh7th/cmp-nvim-lsp
|
|
||||||
|
|
||||||
return {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
}
|
|
|
@ -4,6 +4,5 @@ return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue