mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Initial migrations to lazy.nvim
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
-- Plugins
|
|
||||||
require('plugins')
|
require('plugins')
|
||||||
|
|
||||||
-- Key maps
|
-- Key maps
|
||||||
|
|||||||
@@ -1,118 +1,134 @@
|
|||||||
-- Setup nvim-cmp.
|
return {
|
||||||
local cmp = require "cmp"
|
"hrsh7th/nvim-cmp",
|
||||||
local lspkind = require("lspkind")
|
enabled = true,
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"hrsh7th/cmp-vsnip",
|
||||||
|
"f3fora/cmp-spell",
|
||||||
|
"hrsh7th/cmp-calc",
|
||||||
|
"hrsh7th/cmp-emoji"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- Setup nvim-cmp.
|
||||||
|
local cmp = require "cmp"
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
return col ~= 0
|
return col ~= 0
|
||||||
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(
|
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(
|
||||||
col, col):match("%s") == nil
|
col, col):match("%s") == nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local feedkey = function(key, mode)
|
local feedkey = function(key, mode)
|
||||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
||||||
mode, true)
|
mode, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
require'lspconfig'.sourcekit.setup {
|
require('lspconfig').sourcekit.setup {
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}
|
|
||||||
|
|
||||||
lspkind.init({
|
|
||||||
symbol_map = {
|
|
||||||
Text = "",
|
|
||||||
Method = "",
|
|
||||||
Function = "",
|
|
||||||
Constructor = "",
|
|
||||||
Field = "ﰠ",
|
|
||||||
Variable = "",
|
|
||||||
Class = "ﴯ",
|
|
||||||
Interface = "",
|
|
||||||
Module = "",
|
|
||||||
Property = "ﰠ",
|
|
||||||
Unit = "塞",
|
|
||||||
Value = "",
|
|
||||||
Enum = "",
|
|
||||||
Keyword = "",
|
|
||||||
Snippet = "",
|
|
||||||
Color = "",
|
|
||||||
File = "",
|
|
||||||
Reference = "",
|
|
||||||
Folder = "",
|
|
||||||
EnumMember = "",
|
|
||||||
Constant = "",
|
|
||||||
Struct = "פּ",
|
|
||||||
Event = "",
|
|
||||||
Operator = "",
|
|
||||||
TypeParameter = ""
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup({
|
lspkind.init({
|
||||||
formatting = {
|
symbol_map = {
|
||||||
format = lspkind.cmp_format {
|
Text = "",
|
||||||
with_text = false,
|
Method = "",
|
||||||
maxwidth = 50,
|
Function = "",
|
||||||
menu = {
|
Constructor = "",
|
||||||
buffer = "BUF",
|
Field = "ﰠ",
|
||||||
nvim_lsp = "LSP",
|
Variable = "",
|
||||||
path = "PATH",
|
Class = "ﴯ",
|
||||||
vsnip = "SNIP",
|
Interface = "",
|
||||||
calc = "CALC",
|
Module = "",
|
||||||
spell = "SPELL",
|
Property = "ﰠ",
|
||||||
emoji = "EMOJI"
|
Unit = "塞",
|
||||||
}
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "פּ",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = ""
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
experimental = {native_menu = false, ghost_text = false},
|
|
||||||
snippet = {
|
cmp.setup({
|
||||||
expand = function(args)
|
formatting = {
|
||||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
format = lspkind.cmp_format {
|
||||||
end
|
with_text = false,
|
||||||
},
|
maxwidth = 50,
|
||||||
mapping = {
|
menu = {
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
buffer = "BUF",
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
nvim_lsp = "LSP",
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
path = "PATH",
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
vsnip = "SNIP",
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
calc = "CALC",
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
spell = "SPELL",
|
||||||
["<CR>"] = cmp.mapping.confirm {
|
emoji = "EMOJI"
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
}
|
||||||
select = false
|
}
|
||||||
},
|
},
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
experimental = {native_menu = false, ghost_text = false},
|
||||||
if cmp.visible() then
|
snippet = {
|
||||||
cmp.select_next_item()
|
expand = function(args)
|
||||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
|
||||||
elseif has_words_before() then
|
|
||||||
cmp.complete()
|
|
||||||
else
|
|
||||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
|
||||||
end
|
end
|
||||||
end, {"i", "s"}),
|
},
|
||||||
["<S-Tab>"] = cmp.mapping(function()
|
mapping = {
|
||||||
if cmp.visible() then
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
cmp.select_prev_item()
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
end
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
end, {"i", "s"})
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
},
|
["<CR>"] = cmp.mapping.confirm {
|
||||||
sources = {
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
{name = "nvim_lsp"}, {name = "buffer", keyword_length = 5},
|
select = false
|
||||||
{name = "vsnip"}, {name = "calc"}, {name = "emoji"}, {name = "spell"},
|
},
|
||||||
{name = "path"}
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
}
|
if cmp.visible() then
|
||||||
})
|
cmp.select_next_item()
|
||||||
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
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()
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||||
|
end
|
||||||
|
end, {"i", "s"})
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{name = "nvim_lsp"}, {name = "buffer", keyword_length = 5},
|
||||||
|
{name = "vsnip"}, {name = "calc"}, {name = "emoji"}, {name = "spell"},
|
||||||
|
{name = "path"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/`.
|
-- Use buffer source for `/`.
|
||||||
cmp.setup.cmdline("/", {sources = {{name = "buffer"}}})
|
cmp.setup.cmdline("/", {sources = {{name = "buffer"}}})
|
||||||
|
|
||||||
-- Use cmdline & path source for ':'.
|
-- Use cmdline & path source for ':'.
|
||||||
cmp.setup.cmdline(":", {
|
cmp.setup.cmdline(":", {
|
||||||
sources = cmp.config.sources({{name = "path"}}, {{name = "cmdline"}})
|
sources = cmp.config.sources({{name = "path"}}, {{name = "cmdline"}})
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|||||||
105
nvim/lua/config/init.lua
Normal file
105
nvim/lua/config/init.lua
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
-- Theme
|
||||||
|
{
|
||||||
|
'EdenEast/nightfox.nvim',
|
||||||
|
lazy = false, -- make sure we load this during startup
|
||||||
|
priority = 1000, -- make sure to load this before all other plugins.
|
||||||
|
config = function()
|
||||||
|
-- load the colorscheme
|
||||||
|
vim.cmd([[colorscheme nightfox]])
|
||||||
|
end,
|
||||||
|
--config = get_config("nightfox")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = {
|
||||||
|
-- "nvim-tree/web-dev-icons"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
--require('lau
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
-- config = get_config("treesitter"),
|
||||||
|
-- run = ":TSUpdate"
|
||||||
|
},
|
||||||
|
|
||||||
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
{
|
||||||
|
"onsails/lspkind-nvim",
|
||||||
|
dependencies = {
|
||||||
|
"famiu/bufdelete.nvim"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ray-x/lsp_signature.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ "williamboman/mason.nvim" },
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
config = function()
|
||||||
|
require('mason').setup()
|
||||||
|
require('mason-lspconfig').setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"bashls",
|
||||||
|
"clangd",
|
||||||
|
"dockerls",
|
||||||
|
"gopls",
|
||||||
|
"jsonls",
|
||||||
|
"jedi_language_server",
|
||||||
|
"lua_ls",
|
||||||
|
"terraformls",
|
||||||
|
"tsserver",
|
||||||
|
"texlab",
|
||||||
|
"yamlls",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
-- requirement for Neogit
|
||||||
|
{
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
cmd = {
|
||||||
|
"DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles",
|
||||||
|
"DiffviewFocusFiles"
|
||||||
|
},
|
||||||
|
--config = get_config("diffview")
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TimUntersberger/neogit",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim", -- optional
|
||||||
|
"sindrets/diffview.nvim", -- optional
|
||||||
|
},
|
||||||
|
cmd = "Neogit",
|
||||||
|
--config = get_config("neogit")
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"hrsh7th/vim-vsnip",
|
||||||
|
--config = get_config("vsnip")
|
||||||
|
},
|
||||||
|
|
||||||
|
-- use({
|
||||||
|
-- "andrewferrier/wrapping.nvim",
|
||||||
|
-- config = function()
|
||||||
|
-- require("wrapping").setup()
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,16 +1,6 @@
|
|||||||
local lsp_installer = require("nvim-lsp-installer")
|
return {
|
||||||
|
"williamboman/nvim-lsp-installer",
|
||||||
-- Register a handler that will be called for all installed servers.
|
config = function()
|
||||||
-- Alternatively, you may also register handlers on specific server instances instead (see example below).
|
require("nvim-lsp-installer").setup()
|
||||||
lsp_installer.on_server_ready(function(server)
|
end
|
||||||
local opts = {}
|
}
|
||||||
|
|
||||||
-- (optional) Customize the options passed to the server
|
|
||||||
-- if server.name == "tsserver" then
|
|
||||||
-- opts.root_dir = function() ... end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- This setup() function is exactly the same as lspconfig's setup function.
|
|
||||||
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
|
||||||
server:setup(opts)
|
|
||||||
end)
|
|
||||||
|
|||||||
158
nvim/lua/config/lspconfig.lua
Normal file
158
nvim/lua/config/lspconfig.lua
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mason").setup()
|
||||||
|
require("mason-lspconfig").setup()
|
||||||
|
local nvim_lsp = require("lspconfig")
|
||||||
|
|
||||||
|
-- Use an on_attach function to only map the following keys
|
||||||
|
-- after the language server attaches to the current buffer
|
||||||
|
local on_attach = function(bufnr)
|
||||||
|
local function buf_set_keymap(...)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Mappings.
|
||||||
|
local opts = {noremap = true, silent = true}
|
||||||
|
|
||||||
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
|
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "gT", vim.lsp.buf.type_definition, opts)
|
||||||
|
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||||
|
buf_set_keymap("n", "<space>wa",
|
||||||
|
"<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>wr",
|
||||||
|
"<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>wl",
|
||||||
|
"<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>",
|
||||||
|
opts)
|
||||||
|
buf_set_keymap("n", "<space>D",
|
||||||
|
"<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>",
|
||||||
|
opts)
|
||||||
|
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
||||||
|
|
||||||
|
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
||||||
|
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
|
-- map buffer local keybindings when the language server attaches
|
||||||
|
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
local servers = {
|
||||||
|
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
|
||||||
|
"tsserver", "texlab", "yamlls", "jsonls", "clangd", "sourcekit"
|
||||||
|
}
|
||||||
|
for _, lsp in ipairs(servers) do
|
||||||
|
nvim_lsp[lsp].setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
gopls = {analyses = {unusedparams = false}, staticcheck = true},
|
||||||
|
json = {
|
||||||
|
format = {enabled = false},
|
||||||
|
schemas = {
|
||||||
|
{
|
||||||
|
description = "ESLint config",
|
||||||
|
fileMatch = {".eslintrc.json", ".eslintrc"},
|
||||||
|
url = "http://json.schemastore.org/eslintrc"
|
||||||
|
}, {
|
||||||
|
description = "Package config",
|
||||||
|
fileMatch = {"package.json"},
|
||||||
|
url = "https://json.schemastore.org/package"
|
||||||
|
}, {
|
||||||
|
description = "Packer config",
|
||||||
|
fileMatch = {"packer.json"},
|
||||||
|
url = "https://json.schemastore.org/packer"
|
||||||
|
}, {
|
||||||
|
description = "Renovate config",
|
||||||
|
fileMatch = {
|
||||||
|
"renovate.json", "renovate.json5",
|
||||||
|
".github/renovate.json", ".github/renovate.json5",
|
||||||
|
".renovaterc", ".renovaterc.json"
|
||||||
|
},
|
||||||
|
url = "https://docs.renovatebot.com/renovate-schema"
|
||||||
|
}, {
|
||||||
|
description = "OpenApi config",
|
||||||
|
fileMatch = {"*api*.json"},
|
||||||
|
url = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
redhat = {telemetry = {enabled = false}},
|
||||||
|
texlab = {
|
||||||
|
auxDirectory = ".",
|
||||||
|
bibtexFormatter = "texlab",
|
||||||
|
build = {
|
||||||
|
args = {
|
||||||
|
"--keep-intermediates", "--keep-logs", "--synctex", "%f"
|
||||||
|
},
|
||||||
|
executable = "tectonic",
|
||||||
|
forwardSearchAfter = false,
|
||||||
|
onSave = false
|
||||||
|
},
|
||||||
|
chktex = {onEdit = false, onOpenAndSave = false},
|
||||||
|
diagnosticsDelay = 300,
|
||||||
|
formatterLineLength = 80,
|
||||||
|
forwardSearch = {args = {}},
|
||||||
|
latexFormatter = "latexindent",
|
||||||
|
latexindent = {modifyLineBreaks = false}
|
||||||
|
},
|
||||||
|
yaml = {
|
||||||
|
schemaStore = {
|
||||||
|
enable = true,
|
||||||
|
url = "https://www.schemastore.org/api/json/catalog.json"
|
||||||
|
},
|
||||||
|
schemas = {
|
||||||
|
kubernetes = "/*.yaml",
|
||||||
|
["http://json.schemastore.org/github-workflow"] = ".github/workflows/*.{yml,yaml}",
|
||||||
|
["http://json.schemastore.org/github-action"] = ".github/action.{yml,yaml}",
|
||||||
|
["http://json.schemastore.org/ansible-stable-2.9"] = "roles/tasks/*.{yml,yaml}",
|
||||||
|
["http://json.schemastore.org/prettierrc"] = ".prettierrc.{yml,yaml}",
|
||||||
|
["http://json.schemastore.org/kustomization"] = "kustomization.{yml,yaml}",
|
||||||
|
["http://json.schemastore.org/ansible-playbook"] = "*play*.{yml,yaml}",
|
||||||
|
["http://json.schemastore.org/chart"] = "Chart.{yml,yaml}",
|
||||||
|
["https://json.schemastore.org/dependabot-v2"] = ".github/dependabot.{yml,yaml}",
|
||||||
|
["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}",
|
||||||
|
["https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"] = "*api*.{yml,yaml}",
|
||||||
|
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.{yml,yaml}",
|
||||||
|
["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}"
|
||||||
|
},
|
||||||
|
format = {enabled = false},
|
||||||
|
validate = false, -- TODO: conflicts between Kubernetes resources and kustomization.yaml
|
||||||
|
completion = true,
|
||||||
|
hover = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
flags = {debounce_text_changes = 150}
|
||||||
|
}
|
||||||
|
require"lsp_signature".setup({
|
||||||
|
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||||
|
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
||||||
|
doc_lines = 2, -- Set to 0 for not showing doc
|
||||||
|
hint_prefix = "🐼 ",
|
||||||
|
-- use_lspsaga = false, -- set to true if you want to use lspsaga popup
|
||||||
|
handler_opts = {
|
||||||
|
border = "shadow" -- double, single, shadow, none
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Test source-kit
|
||||||
|
require('lspconfig').sourcekit.setup{}
|
||||||
|
|
||||||
|
end
|
||||||
|
}
|
||||||
16
nvim/lua/config/neo-tree.lua
Normal file
16
nvim/lua/config/neo-tree.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("neo-tree").setup({
|
||||||
|
close_if_last_window = false,
|
||||||
|
enable_git_status = true,
|
||||||
|
enable_diagnostics = true
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -1,66 +1,76 @@
|
|||||||
local actions = require('telescope.actions')
|
return {
|
||||||
local telescope = require('telescope')
|
'nvim-telescope/telescope.nvim',
|
||||||
|
branch = '0.1.x',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('telescope').setup({
|
||||||
|
defaults = {
|
||||||
|
file_ignore_patterns = {"node_modules", "%.jpg", "%.png"},
|
||||||
|
vimgrep_arguments = {
|
||||||
|
'rg',
|
||||||
|
'--follow',
|
||||||
|
'--color=never',
|
||||||
|
'--no-heading',
|
||||||
|
'--with-filename',
|
||||||
|
'--line-number',
|
||||||
|
'--column',
|
||||||
|
'--smart-case'
|
||||||
|
},
|
||||||
|
-- mappings = {
|
||||||
|
-- i = {
|
||||||
|
-- -- Close on first esc instead of gonig to normal mode
|
||||||
|
-- ["<esc>"] = actions.close,
|
||||||
|
-- ["<A-q>"] = actions.send_selected_to_qflist,
|
||||||
|
-- ["<C-q>"] = actions.send_to_qflist,
|
||||||
|
-- ["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
||||||
|
-- ["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
||||||
|
-- },
|
||||||
|
-- n = {
|
||||||
|
-- ["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
||||||
|
-- ["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
||||||
|
-- ["<A-q>"] = actions.send_selected_to_qflist,
|
||||||
|
-- ["<C-q>"] = actions.send_to_qflist,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
prompt_prefix = " ",
|
||||||
|
selection_caret = " ",
|
||||||
|
entry_prefix = " ",
|
||||||
|
initial_mode = "insert",
|
||||||
|
selection_strategy = "reset",
|
||||||
|
sorting_strategy = "descending",
|
||||||
|
layout_strategy = "flex",
|
||||||
|
layout_config = {
|
||||||
|
width = 0.75,
|
||||||
|
prompt_position = "bottom",
|
||||||
|
preview_cutoff = 120,
|
||||||
|
horizontal = { mirror = false },
|
||||||
|
vertical = { mirror = true },
|
||||||
|
},
|
||||||
|
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
||||||
|
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
||||||
|
-- path_display = true, -- strange behaviour not showing the files in result window
|
||||||
|
winblend = 0,
|
||||||
|
border = {},
|
||||||
|
borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
|
||||||
|
color_devicons = true,
|
||||||
|
use_less = true,
|
||||||
|
set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil,
|
||||||
|
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
||||||
|
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
||||||
|
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
||||||
|
|
||||||
--telescope.load_extension('projects')
|
-- Developer configurations: Not meant for general override
|
||||||
telescope.load_extension('fzf')
|
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
telescope.setup{
|
local builtin = require('telescope.builtin')
|
||||||
defaults = {
|
-- Telescope keymaps
|
||||||
file_ignore_patterns = {"node_modules", "%.jpg", "%.png"},
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||||
vimgrep_arguments = {
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||||
'rg',
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||||
'--follow',
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||||
'--color=never',
|
end
|
||||||
'--no-heading',
|
|
||||||
'--with-filename',
|
|
||||||
'--line-number',
|
|
||||||
'--column',
|
|
||||||
'--smart-case'
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
-- Close on first esc instead of gonig to normal mode
|
|
||||||
["<esc>"] = actions.close,
|
|
||||||
["<A-q>"] = actions.send_selected_to_qflist,
|
|
||||||
["<C-q>"] = actions.send_to_qflist,
|
|
||||||
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
|
||||||
["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
|
||||||
["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
|
||||||
["<A-q>"] = actions.send_selected_to_qflist,
|
|
||||||
["<C-q>"] = actions.send_to_qflist,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
prompt_prefix = " ",
|
|
||||||
selection_caret = " ",
|
|
||||||
entry_prefix = " ",
|
|
||||||
initial_mode = "insert",
|
|
||||||
selection_strategy = "reset",
|
|
||||||
sorting_strategy = "descending",
|
|
||||||
layout_strategy = "flex",
|
|
||||||
layout_config = {
|
|
||||||
width = 0.75,
|
|
||||||
prompt_position = "bottom",
|
|
||||||
preview_cutoff = 120,
|
|
||||||
horizontal = { mirror = false },
|
|
||||||
vertical = { mirror = true },
|
|
||||||
},
|
|
||||||
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
|
||||||
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
|
||||||
-- path_display = true, -- strange behaviour not showing the files in result window
|
|
||||||
winblend = 0,
|
|
||||||
border = {},
|
|
||||||
borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
|
|
||||||
color_devicons = true,
|
|
||||||
use_less = true,
|
|
||||||
set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil,
|
|
||||||
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
|
||||||
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
|
||||||
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
|
||||||
|
|
||||||
-- Developer configurations: Not meant for general override
|
|
||||||
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
118
nvim/lua/config/tmp/cmp.lua
Normal file
118
nvim/lua/config/tmp/cmp.lua
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
-- Setup nvim-cmp.
|
||||||
|
local cmp = require "cmp"
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
|
local has_words_before = function()
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0
|
||||||
|
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(
|
||||||
|
col, col):match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local feedkey = function(key, mode)
|
||||||
|
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
||||||
|
mode, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
require'lspconfig'.sourcekit.setup {
|
||||||
|
capabilities = capabilities
|
||||||
|
}
|
||||||
|
|
||||||
|
lspkind.init({
|
||||||
|
symbol_map = {
|
||||||
|
Text = "",
|
||||||
|
Method = "",
|
||||||
|
Function = "",
|
||||||
|
Constructor = "",
|
||||||
|
Field = "ﰠ",
|
||||||
|
Variable = "",
|
||||||
|
Class = "ﴯ",
|
||||||
|
Interface = "",
|
||||||
|
Module = "",
|
||||||
|
Property = "ﰠ",
|
||||||
|
Unit = "塞",
|
||||||
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "פּ",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = ""
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
formatting = {
|
||||||
|
format = lspkind.cmp_format {
|
||||||
|
with_text = false,
|
||||||
|
maxwidth = 50,
|
||||||
|
menu = {
|
||||||
|
buffer = "BUF",
|
||||||
|
nvim_lsp = "LSP",
|
||||||
|
path = "PATH",
|
||||||
|
vsnip = "SNIP",
|
||||||
|
calc = "CALC",
|
||||||
|
spell = "SPELL",
|
||||||
|
emoji = "EMOJI"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
experimental = {native_menu = false, ghost_text = false},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
|
end
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = false
|
||||||
|
},
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
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()
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||||
|
end
|
||||||
|
end, {"i", "s"})
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{name = "nvim_lsp"}, {name = "buffer", keyword_length = 5},
|
||||||
|
{name = "vsnip"}, {name = "calc"}, {name = "emoji"}, {name = "spell"},
|
||||||
|
{name = "path"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use buffer source for `/`.
|
||||||
|
cmp.setup.cmdline("/", {sources = {{name = "buffer"}}})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':'.
|
||||||
|
cmp.setup.cmdline(":", {
|
||||||
|
sources = cmp.config.sources({{name = "path"}}, {{name = "cmdline"}})
|
||||||
|
})
|
||||||
16
nvim/lua/config/tmp/lsp-installer.lua
Normal file
16
nvim/lua/config/tmp/lsp-installer.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
local lsp_installer = require("nvim-lsp-installer")
|
||||||
|
|
||||||
|
-- Register a handler that will be called for all installed servers.
|
||||||
|
-- Alternatively, you may also register handlers on specific server instances instead (see example below).
|
||||||
|
lsp_installer.on_server_ready(function(server)
|
||||||
|
local opts = {}
|
||||||
|
|
||||||
|
-- (optional) Customize the options passed to the server
|
||||||
|
-- if server.name == "tsserver" then
|
||||||
|
-- opts.root_dir = function() ... end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- This setup() function is exactly the same as lspconfig's setup function.
|
||||||
|
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
|
server:setup(opts)
|
||||||
|
end)
|
||||||
@@ -34,7 +34,7 @@ g.nvim_tree_icons = {
|
|||||||
}
|
}
|
||||||
g.loaded_netrw = 1
|
g.loaded_netrw = 1
|
||||||
g.loaded_netrwPlugin = 1
|
g.loaded_netrwPlugin = 1
|
||||||
local tree_cb = require"nvim-tree.config".nvim_tree_callback
|
local tree_cb = require("nvim-tree.config").nvim_tree_callback
|
||||||
|
|
||||||
-- This function has been generated from your
|
-- This function has been generated from your
|
||||||
-- view.mappings.list
|
-- view.mappings.list
|
||||||
66
nvim/lua/config/tmp/telescope.lua
Normal file
66
nvim/lua/config/tmp/telescope.lua
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
local actions = require('telescope.actions')
|
||||||
|
local telescope = require('telescope')
|
||||||
|
|
||||||
|
--telescope.load_extension('projects')
|
||||||
|
telescope.load_extension('fzf')
|
||||||
|
|
||||||
|
telescope.setup{
|
||||||
|
defaults = {
|
||||||
|
file_ignore_patterns = {"node_modules", "%.jpg", "%.png"},
|
||||||
|
vimgrep_arguments = {
|
||||||
|
'rg',
|
||||||
|
'--follow',
|
||||||
|
'--color=never',
|
||||||
|
'--no-heading',
|
||||||
|
'--with-filename',
|
||||||
|
'--line-number',
|
||||||
|
'--column',
|
||||||
|
'--smart-case'
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
-- Close on first esc instead of gonig to normal mode
|
||||||
|
["<esc>"] = actions.close,
|
||||||
|
["<A-q>"] = actions.send_selected_to_qflist,
|
||||||
|
["<C-q>"] = actions.send_to_qflist,
|
||||||
|
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
||||||
|
["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<s-tab>"] = actions.toggle_selection + actions.move_selection_next,
|
||||||
|
["<tab>"] = actions.toggle_selection + actions.move_selection_previous,
|
||||||
|
["<A-q>"] = actions.send_selected_to_qflist,
|
||||||
|
["<C-q>"] = actions.send_to_qflist,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
prompt_prefix = " ",
|
||||||
|
selection_caret = " ",
|
||||||
|
entry_prefix = " ",
|
||||||
|
initial_mode = "insert",
|
||||||
|
selection_strategy = "reset",
|
||||||
|
sorting_strategy = "descending",
|
||||||
|
layout_strategy = "flex",
|
||||||
|
layout_config = {
|
||||||
|
width = 0.75,
|
||||||
|
prompt_position = "bottom",
|
||||||
|
preview_cutoff = 120,
|
||||||
|
horizontal = { mirror = false },
|
||||||
|
vertical = { mirror = true },
|
||||||
|
},
|
||||||
|
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
||||||
|
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
||||||
|
-- path_display = true, -- strange behaviour not showing the files in result window
|
||||||
|
winblend = 0,
|
||||||
|
border = {},
|
||||||
|
borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
|
||||||
|
color_devicons = true,
|
||||||
|
use_less = true,
|
||||||
|
set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil,
|
||||||
|
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
||||||
|
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
||||||
|
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
||||||
|
|
||||||
|
-- Developer configurations: Not meant for general override
|
||||||
|
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
|
||||||
|
}
|
||||||
|
}
|
||||||
8
nvim/lua/config/which-key.lua
Normal file
8
nvim/lua/config/which-key.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
init = function()
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 300
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -2,10 +2,6 @@ local keymap = vim.api.nvim_set_keymap
|
|||||||
local default_options = {noremap = true, silent = true}
|
local default_options = {noremap = true, silent = true}
|
||||||
-- local expr_options = {noremap = true, expr = true, silent = true}
|
-- local expr_options = {noremap = true, expr = true, silent = true}
|
||||||
|
|
||||||
-- map the leader key
|
|
||||||
keymap('n', '<Space>', '<NOP>', default_options)
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
-- easier escape key mapping
|
-- easier escape key mapping
|
||||||
keymap('i', 'jk', '<ESC>', default_options)
|
keymap('i', 'jk', '<ESC>', default_options)
|
||||||
|
|
||||||
@@ -32,4 +28,5 @@ keymap("x", "K", ":move '<-2<CR>gv-gv", default_options)
|
|||||||
keymap("x", "J", ":move '>+1<CR>gv-gv", default_options)
|
keymap("x", "J", ":move '>+1<CR>gv-gv", default_options)
|
||||||
|
|
||||||
-- Toggle nvim-tree open or closed
|
-- Toggle nvim-tree open or closed
|
||||||
keymap("n", "<c-n>", "<CMD>NvimTreeToggle<CR>", default_options)
|
keymap("n", "<c-n>", "<CMD>:Neotree toggle<CR>", default_options)
|
||||||
|
|
||||||
|
|||||||
@@ -1,121 +1,18 @@
|
|||||||
-- Plugins
|
-- Plugins
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
local execute = vim.api.nvim_command
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
local fn = vim.fn
|
vim.fn.system({
|
||||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
-- returns the require for use in `config` parameter of packer's use
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
-- expects the name of the config file
|
"--branch=stable", -- latest stable release
|
||||||
function get_config(name)
|
lazypath,
|
||||||
return string.format("require(\"config/%s\")", name)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Install packer if not available
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
fn.system({
|
|
||||||
"git", "clone", "https://github.com/wbthomason/packer.nvim",
|
|
||||||
install_path
|
|
||||||
})
|
})
|
||||||
execute "packadd packer.nvim"
|
|
||||||
end
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
-- Initialize and configure packer
|
vim.g.mapleader = ' '
|
||||||
local packer = require("packer")
|
vim.g.maplocalleader = ' '
|
||||||
packer.init {
|
|
||||||
enable = true, -- enable profiling via :PackerCompile profile=true
|
|
||||||
threshold = 0 -- the amount in ms that a plugins load time must be over for it to be included in the profile
|
|
||||||
}
|
|
||||||
local use = packer.use
|
|
||||||
packer.reset()
|
|
||||||
|
|
||||||
-- actual plugins list
|
require("lazy").setup('config')
|
||||||
use "wbthomason/packer.nvim"
|
|
||||||
|
|
||||||
use {"kyazdani42/nvim-tree.lua", config = get_config("nvim-tree")}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
config = get_config("lualine"),
|
|
||||||
requires = {"kyazdani42/nvim-web-devicons", opt = true}
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
config = get_config("telescope"),
|
|
||||||
requires = { {'nvim-lua/plenary.nvim'} }
|
|
||||||
}
|
|
||||||
|
|
||||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
|
||||||
|
|
||||||
use {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
config = get_config("treesitter"),
|
|
||||||
run = ":TSUpdate"
|
|
||||||
}
|
|
||||||
|
|
||||||
use "nvim-treesitter/nvim-treesitter-textobjects"
|
|
||||||
|
|
||||||
use {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
requires = {
|
|
||||||
{"hrsh7th/cmp-nvim-lsp"}, {"hrsh7th/cmp-buffer"}, {"hrsh7th/cmp-path"},
|
|
||||||
{"hrsh7th/cmp-cmdline"}, {"hrsh7th/cmp-vsnip"},
|
|
||||||
{"f3fora/cmp-spell", {"hrsh7th/cmp-calc"}, {"hrsh7th/cmp-emoji"}}
|
|
||||||
},
|
|
||||||
config = get_config("cmp")
|
|
||||||
}
|
|
||||||
|
|
||||||
use {"onsails/lspkind-nvim", requires = {{"famiu/bufdelete.nvim"}}}
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
use {"ray-x/lsp_signature.nvim", requires = {{"neovim/nvim-lspconfig"}}}
|
|
||||||
|
|
||||||
use { "williamboman/mason.nvim" }
|
|
||||||
use { "williamboman/mason-lspconfig.nvim" }
|
|
||||||
use {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
config = get_config("lsp")
|
|
||||||
}
|
|
||||||
use {
|
|
||||||
"williamboman/nvim-lsp-installer",
|
|
||||||
config = get_config("lsp-installer")
|
|
||||||
}
|
|
||||||
|
|
||||||
use {"folke/which-key.nvim", event = "VimEnter", config = get_config("which")}
|
|
||||||
|
|
||||||
-- requirement for Neogit
|
|
||||||
use {
|
|
||||||
"sindrets/diffview.nvim",
|
|
||||||
cmd = {
|
|
||||||
"DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles",
|
|
||||||
"DiffviewFocusFiles"
|
|
||||||
},
|
|
||||||
config = get_config("diffview")
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"TimUntersberger/neogit",
|
|
||||||
requires = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-telescope/telescope.nvim", -- optional
|
|
||||||
"sindrets/diffview.nvim", -- optional
|
|
||||||
},
|
|
||||||
cmd = "Neogit",
|
|
||||||
config = get_config("neogit")
|
|
||||||
}
|
|
||||||
|
|
||||||
use {"hrsh7th/vim-vsnip", config = get_config("vsnip")}
|
|
||||||
|
|
||||||
use({
|
|
||||||
"andrewferrier/wrapping.nvim",
|
|
||||||
config = function()
|
|
||||||
require("wrapping").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Theme
|
|
||||||
use {
|
|
||||||
'EdenEast/nightfox.nvim',
|
|
||||||
config = get_config("nightfox")
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user