2023-05-21 22:15:06 +02:00
|
|
|
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
|
|
|
vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]]
|
|
|
|
|
|
|
|
local border = {
|
|
|
|
{"🭽", "FloatBorder"},
|
|
|
|
{"▔", "FloatBorder"},
|
|
|
|
{"🭾", "FloatBorder"},
|
|
|
|
{"▕", "FloatBorder"},
|
|
|
|
{"🭿", "FloatBorder"},
|
|
|
|
{"▁", "FloatBorder"},
|
|
|
|
{"🭼", "FloatBorder"},
|
|
|
|
{"▏", "FloatBorder"},
|
|
|
|
}
|
|
|
|
|
|
|
|
-- LSP settings (for overriding per client)
|
|
|
|
local handlers = {
|
|
|
|
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}),
|
|
|
|
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {border = border }),
|
|
|
|
}
|
|
|
|
|
|
|
|
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
|
|
|
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
|
|
|
opts = opts or {}
|
|
|
|
opts.border = opts.border or border
|
|
|
|
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
|
|
|
end
|
|
|
|
|
2023-05-22 22:15:55 +02:00
|
|
|
--[==========[
|
2023-05-21 22:15:06 +02:00
|
|
|
░█░░░█▀█░▀▀█░█░█░░░░█▀█░█░█░▀█▀░█▄█
|
|
|
|
░█░░░█▀█░▄▀░░░█░░░░░█░█░▀▄▀░░█░░█░█
|
|
|
|
░▀▀▀░▀░▀░▀▀▀░░▀░░▀░░▀░▀░░▀░░▀▀▀░▀░▀
|
2023-05-22 22:15:55 +02:00
|
|
|
--]==========]
|
2023-05-21 22:15:06 +02:00
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
|
|
if not vim.loop.fs_stat(lazypath) then
|
|
|
|
vim.fn.system({
|
|
|
|
"git",
|
|
|
|
"clone",
|
|
|
|
"--filter=blob:none",
|
|
|
|
"https://github.com/folke/lazy.nvim.git",
|
|
|
|
"--branch=stable", -- latest stable release
|
|
|
|
lazypath,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
|
|
|
|
|
|
|
require("lazy").setup("plugins")
|
2023-05-22 22:15:55 +02:00
|
|
|
|
2023-05-23 15:12:26 +02:00
|
|
|
--[==========[
|
|
|
|
░█▀█░█▀█░▀█▀░█▀▀░█▀▀░█▀▀░█▀▄
|
|
|
|
░█▀█░█░█░░█░░▀▀█░█▀▀░█▀▀░█░█
|
|
|
|
░▀░▀░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀░
|
|
|
|
--]==========]
|
|
|
|
local aniseedpath = vim.fn.stdpath("data") .. "/lazy/aniseed"
|
|
|
|
if not vim.loop.fs_stat(aniseedpath) then
|
|
|
|
vim.fn.system({
|
|
|
|
"git",
|
|
|
|
"clone",
|
|
|
|
"--filter=blob:none",
|
|
|
|
"--single-branch",
|
|
|
|
"https://github.com/Olical/aniseed.git",
|
|
|
|
aniseedpath
|
|
|
|
})
|
|
|
|
end
|
|
|
|
vim.opt.rtp:prepend(aniseedpath)
|
|
|
|
vim.g["aniseed#env"] = true
|
|
|
|
--require("aniseed").setup()
|
|
|
|
require("aniseed.env").init()
|
|
|
|
|
|
|
|
|
|
|
|
--[[
|
|
|
|
local hotpot_path = vim.fn.stdpath("data") .. "/lazy/hotpot.nvim"
|
|
|
|
if not vim.loop.fs_stat(hotpot_path) then
|
|
|
|
vim.notify("Bootstrapping hotpot.nvim...", vim.log.levels.INFO)
|
|
|
|
vim.fn.system({
|
|
|
|
"git",
|
|
|
|
"clone",
|
|
|
|
"--filter=blob:none",
|
|
|
|
"--single-branch",
|
|
|
|
"https://github.com/rktjmp/hotpot.nvim.git",
|
|
|
|
hotpot_path,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
vim.opt.runtimepath:prepend(hotpot_path)
|
|
|
|
require("hotpot").setup({
|
|
|
|
provide_require_fennel = true,
|
|
|
|
|
|
|
|
compiler = {
|
|
|
|
modules = {
|
|
|
|
correlate = true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
require "config"
|
|
|
|
--]]
|
|
|
|
|
2023-05-22 22:15:55 +02:00
|
|
|
--[==========[
|
|
|
|
░█▀█░█░█░▀█▀░█▄█░░░░░█▀▀░█▄█░█▀█
|
|
|
|
░█░█░▀▄▀░░█░░█░█░▄▄▄░█░░░█░█░█▀▀
|
|
|
|
░▀░▀░░▀░░▀▀▀░▀░▀░░░░░▀▀▀░▀░▀░▀░░
|
|
|
|
--]==========]
|
2023-05-23 11:26:04 +02:00
|
|
|
--[==[
|
2023-05-22 22:15:55 +02:00
|
|
|
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()
|
2023-05-23 11:26:04 +02:00
|
|
|
--]==]
|
|
|
|
|