All plugins written to lazy instead of packer
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
|
"dichromatic": { "branch": "master", "commit": "9765a72ce24ddae48afe12c316583a22c82ad812" },
|
||||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
|
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
|
||||||
"lsp-zero.nvim": { "branch": "v4.x", "commit": "9823b3e27deaf9f0152f3bc22f05b54f21e234e8" },
|
"lsp-zero.nvim": { "branch": "v4.x", "commit": "9823b3e27deaf9f0152f3bc22f05b54f21e234e8" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" },
|
"nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "c436d45eeeeb78e5482cb28b59de1d7a77c93d86" },
|
"nvim-treesitter": { "branch": "master", "commit": "d22166e3d8d375b761c32b303176f3e955560b0c" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"plenary": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||||
"vim-dichromatic": { "branch": "master", "commit": "9765a72ce24ddae48afe12c316583a22c82ad812" },
|
|
||||||
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }
|
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,11 @@ end
|
|||||||
|
|
||||||
vim.keymap.set("n", "<leader>c", function() ColorMyPencils() end)
|
vim.keymap.set("n", "<leader>c", function() ColorMyPencils() end)
|
||||||
|
|
||||||
ColorMyPencils()
|
return {
|
||||||
|
"romainl/vim-dichromatic",
|
||||||
|
name = "dichromatic",
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
ColorMyPencils()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
local mark = require("harpoon.mark")
|
return {
|
||||||
local ui = require("harpoon.ui")
|
"theprimeagen/harpoon",
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
config = function()
|
||||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
local mark = require("harpoon.mark")
|
||||||
vim.keymap.set("n", "<leader>1", function() ui.nav_file(1) end)
|
local ui = require("harpoon.ui")
|
||||||
vim.keymap.set("n", "<leader>2", function() ui.nav_file(2) end)
|
|
||||||
vim.keymap.set("n", "<leader>3", function() ui.nav_file(3) end)
|
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||||
vim.keymap.set("n", "<leader>4", function() ui.nav_file(4) end)
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||||
|
vim.keymap.set("n", "<leader>1", function() ui.nav_file(1) end)
|
||||||
|
vim.keymap.set("n", "<leader>2", function() ui.nav_file(2) end)
|
||||||
|
vim.keymap.set("n", "<leader>3", function() ui.nav_file(3) end)
|
||||||
|
vim.keymap.set("n", "<leader>4", function() ui.nav_file(4) end)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,26 +7,3 @@ return {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
tag = "0.1.6",
|
|
||||||
requires = {
|
|
||||||
{ "nvim-lua/plenary.nvim" } }
|
|
||||||
},
|
|
||||||
{ "romainl/vim-dichromatic", config = function() vim.cmd('colorscheme dichromatic') end },
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
build = function()
|
|
||||||
require("nvim-treesitter.install").update({ with_sync = true })()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
"nvim-treesitter/playground",
|
|
||||||
"theprimeagen/harpoon",
|
|
||||||
"mbbill/undotree",
|
|
||||||
"tpope/vim-fugitive",
|
|
||||||
{ 'VonHeikemen/lsp-zero.nvim', branch = 'v4.x' },
|
|
||||||
{ 'neovim/nvim-lspconfig' },
|
|
||||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
|
||||||
{ 'hrsh7th/nvim-cmp' },
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,18 +1,86 @@
|
|||||||
local lsp = require('lsp-zero').preset({})
|
return {
|
||||||
|
{
|
||||||
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
|
branch = "v4.x",
|
||||||
|
lazy = true,
|
||||||
|
config = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
lazy = false,
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
|
||||||
lsp.ensure_installed({
|
-- Autocompletion
|
||||||
'lua_ls', -- Lua
|
{
|
||||||
'rust_analyzer', -- rust
|
"hrsh7th/nvim-cmp",
|
||||||
'texlab', -- LaTeX
|
event = "InsertEnter",
|
||||||
'clangd', -- C/C++
|
dependencies = {
|
||||||
'jedi_language_server', -- Python
|
{ "L3MON4D3/LuaSnip" },
|
||||||
'html', -- HTML
|
},
|
||||||
'ocamllsp', -- OCaml
|
config = function()
|
||||||
})
|
local cmp = require('cmp')
|
||||||
|
|
||||||
-- Fix undefined global 'vim'
|
cmp.setup({
|
||||||
lsp.configure('lua_ls', {
|
sources = {
|
||||||
cmd = { 'lua-language-server' },
|
{ name = "nvim_lsp" },
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
}),
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.snippet.expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
cmd = { 'LspInfo', 'LspInstall', 'LspStart' },
|
||||||
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
|
dependencies = {
|
||||||
|
{ "hrsh7th/cmp-nvim-lsp" },
|
||||||
|
{ "williamboman/mason.nvim" },
|
||||||
|
{ "williamboman/mason-lspconfig.nvim" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local lsp_zero = require('lsp-zero')
|
||||||
|
|
||||||
|
-- lsp_attach is where you enable features that only work
|
||||||
|
-- if there is a language server active in the file
|
||||||
|
local lsp_attach = function(client, bufnr)
|
||||||
|
local opts = { buffer = bufnr }
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
||||||
|
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
||||||
|
vim.keymap.set({ 'n', 'x' }, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
||||||
|
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
lsp_zero.extend_lspconfig({
|
||||||
|
sign_text = true,
|
||||||
|
lsp_attach = lsp_attach,
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
})
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup({
|
||||||
|
ensure_installed = {},
|
||||||
|
handlers = {
|
||||||
|
function(server_name)
|
||||||
|
require('lspconfig')[server_name].setup({})
|
||||||
|
end,
|
||||||
|
lua_ls = function()
|
||||||
|
require('lspconfig').lua_ls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
@@ -30,17 +98,10 @@ lsp.configure('lua_ls', {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
lsp.on_attach(function(_, bufnr)
|
}
|
||||||
lsp.default_keymaps({ buffer = bufnr })
|
})
|
||||||
end)
|
end
|
||||||
|
}
|
||||||
lsp.set_sign_icons({
|
}
|
||||||
error = '✘',
|
|
||||||
warn = '▲',
|
|
||||||
hint = '⚑',
|
|
||||||
info = '»'
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.setup()
|
|
||||||
|
|||||||
@@ -1,6 +1,29 @@
|
|||||||
local builtin = require('telescope.builtin')
|
return {
|
||||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
"nvim-telescope/telescope.nvim",
|
||||||
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
|
||||||
vim.keymap.set('n', '<leader>ps', function()
|
tag = "0.1.8",
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
|
||||||
end)
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require('telescope').setup({})
|
||||||
|
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||||
|
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>pws', function()
|
||||||
|
local word = vim.fn.expand("<cword>")
|
||||||
|
builtin.grep_string({ search = word })
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>pWs', function()
|
||||||
|
local word = vim.fn.expand("<cWORD>")
|
||||||
|
builtin.grep_string({ search = word })
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>ps', function()
|
||||||
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,22 +1,38 @@
|
|||||||
require 'nvim-treesitter.configs'.setup {
|
return {
|
||||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
"nvim-treesitter/nvim-treesitter",
|
||||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp", "cmake", "latex", "python", "groovy",
|
build = function()
|
||||||
"ocaml" },
|
require("nvim-treesitter.instal").update({ with_sync = true})()
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
-- List of parsers
|
||||||
|
ensure_installed = {
|
||||||
|
"vimdoc", "vim", "lua", "c", "rust", "cpp", "cmake", "latex", "python", "groovy", "bash",
|
||||||
|
},
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
||||||
-- Automatically install missing parsers when entering buffer
|
|
||||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
|
|
||||||
|
indent = {
|
||||||
|
enable = true
|
||||||
|
},
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = { "markdown" },
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
||||||
-- Instead of true it can also be a list of languages
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||||
|
treesitter_parser_config.templ = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/vrischmann/tree-sitter-templ.git",
|
||||||
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
|
branch = "master",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
vim .treesitter.language.register("templ", "templ")
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,8 @@
|
|||||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
return {
|
||||||
|
"mbbill/undotree",
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndoTreeToggle)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,6 @@
|
|||||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
return {
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user