switched to lazy.nvim and clean up a bit
This commit is contained in:
1 parent
72bf7e727a
commit
11bb713b60
19 files changed
+290
-331
No files matched your search
@@ -0,0 +1,39 @@
|
||||
local config = function()
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
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 }),
|
||||
["<tab>"] = cmp.mapping.select_next_item(),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "neorg" },
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = config,
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
}
|
||||
},
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
local config = function()
|
||||
local settings = require("config.lsp-settings")
|
||||
local on_attach = settings.on_attach
|
||||
local capabilities = settings.capabilities
|
||||
|
||||
require("lspconfig").lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.g.markdown_fenced_languages = {
|
||||
"ts=typescript"
|
||||
}
|
||||
require("lspconfig").denols.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require("lspconfig").clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require("lspconfig").asm_lsp.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require("lspconfig").pylsp.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require("lspconfig").kotlin_language_server.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
|
||||
local rs_config = function()
|
||||
local settings = require "config.lsp-settings"
|
||||
local on_attach = settings.on_attach
|
||||
local capabilities = settings.capabilities
|
||||
require "rust-tools".setup {
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = config
|
||||
},
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
rs_config = rs_config
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function() require "nvim-autopairs".setup {} end
|
||||
},
|
||||
{
|
||||
"scalameta/nvim-metals",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
},
|
||||
"mfussenegger/nvim-jdtls",
|
||||
"folke/neodev.nvim"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.0",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("telescope").setup {}
|
||||
|
||||
local u = require("config.utils").mapping
|
||||
|
||||
u.cmd("<leader>ff", "Telescope find_files")
|
||||
u.cmd("<leader>fg", "Telescope live_grep")
|
||||
u.cmd("<leader>fb", "Telescope buffers")
|
||||
u.cmd("<leader>fh", "Telescope help_tags")
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
config = function() require("telescope").load_extension("fzf") end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
config = function() require("telescope").load_extension("ui-select") end
|
||||
},
|
||||
{
|
||||
"ziontee113/icon-picker.nvim",
|
||||
dependencies = { "stevearc/dressing.nvim" },
|
||||
config = function()
|
||||
require("icon-picker").setup {}
|
||||
local u = require("config.utils").mapping
|
||||
u.cmd("<leader>fi", "IconPickerYank alt_font symbols nerd_font emoji")
|
||||
vim.keymap.set("i", "<c-s>", "<cmd>IconPickerInsert alt_font symbols nerd_font emoji<cr>")
|
||||
end,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
{
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
branch = "v2.x",
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
'MunifTanjim/nui.nvim'
|
||||
},
|
||||
config = function()
|
||||
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
||||
require('neo-tree').setup {
|
||||
close_if_last_window = true,
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
},
|
||||
},
|
||||
window = {
|
||||
width = 25,
|
||||
mappings = {
|
||||
["e"] = "none",
|
||||
["j"] = "toggle_auto_expand_width",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
local u = require 'config.utils'.mapping
|
||||
u.cmd('<leader>e', 'Neotree toggle')
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
{
|
||||
'nvim-neorg/neorg',
|
||||
tag = '0.0.12',
|
||||
config = function()
|
||||
require('neorg').setup {
|
||||
load = {
|
||||
['core.defaults'] = {},
|
||||
['core.norg.concealer'] = {},
|
||||
['core.norg.completion'] = {
|
||||
config = {
|
||||
engine = 'nvim-cmp'
|
||||
}
|
||||
},
|
||||
['core.export'] = {},
|
||||
}
|
||||
}
|
||||
end,
|
||||
dependencies = 'nvim-lua/plenary.nvim'
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
return {
|
||||
{
|
||||
"navarasu/onedark.nvim",
|
||||
config = function()
|
||||
require("onedark").setup { style = "darker" }
|
||||
require("onedark").load()
|
||||
package.loaded["config.theme"] = nil
|
||||
require("config.theme")
|
||||
end
|
||||
},
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function()
|
||||
if vim.o.termguicolors then
|
||||
require("colorizer").setup()
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("lualine").setup {}
|
||||
end
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function() require("gitsigns").setup() end
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = function()
|
||||
require("nvim-treesitter.install").update {
|
||||
with_sync = true
|
||||
}
|
||||
end,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
ensure_installed = { "norg" },
|
||||
highlight = { enable = true }
|
||||
}
|
||||
end,
|
||||
},
|
||||
"elkowar/yuck.vim",
|
||||
"kmonad/kmonad-vim"
|
||||
}
|
||||
Reference in new issue
Block a user