nvim: moved from packer to lazy

master
tiyn 1 year ago
parent df3d35ddba
commit 2c6e2089a2

@ -1,64 +1,68 @@
-- loadplugins -- loadplugins
-- bootstrap packer -- bootstrap lazy
local ensure_packer = function() local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
local install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' if not vim.loop.fs_stat(lazypath) then
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.fn.system({
vim.fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) "git",
vim.cmd [[packadd packer.nvim]] "clone",
return true "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end end
return false vim.opt.rtp:prepend(lazypath)
end
local packer_bootstrap = ensure_packer()
-- load plugins with packer
return require("packer").startup(function(use)
-- package manager (first entry)
use { 'wbthomason/packer.nvim' }
return require("lazy").setup({
-- indicate git diff status of line -- indicate git diff status of line
use { 'lewis6991/gitsigns.nvim' } 'lewis6991/gitsigns.nvim',
-- show indentation lines (in empty lines too) -- show indentation lines (in empty lines too)
use { 'lukas-reineke/indent-blankline.nvim' } 'lukas-reineke/indent-blankline.nvim',
-- improved java syntax highlighting -- improved java syntax highlighting
use { 'uiiaoo/java-syntax.vim', {
ft = { 'java' } 'uiiaoo/java-syntax.vim',
} ft = { 'java' },
},
-- custom statusline -- custom statusline
use { 'nvim-lualine/lualine.nvim', {
requires = { 'nvim-tree/nvim-web-devicons' } 'nvim-lualine/lualine.nvim',
} dependencies = { 'nvim-tree/nvim-web-devicons', }
},
-- show signature while typing -- show signature while typing
use { 'ray-x/lsp_signature.nvim' } 'ray-x/lsp_signature.nvim',
-- preview for markdown filetypes -- preview for markdown filetypes
use { "iamcco/markdown-preview.nvim", {
"iamcco/markdown-preview.nvim",
ft = { 'markdown' }, ft = { 'markdown' },
run = "cd app && yarn install" build = "cd app && yarn install",
} },
-- latex asynchronous pdf rendering -- latex asynchronous pdf rendering
use { 'donRaphaco/neotex', {
ft = { 'tex' } 'donRaphaco/neotex',
} ft = { 'tex' },
},
-- nim language support -- nim language support
use { 'zah/nim.vim', {
ft = { 'nim' } 'zah/nim.vim',
} ft = { 'nim' },
},
-- automatic closing of brackets -- automatic closing of brackets
use { 'windwp/nvim-autopairs' } 'windwp/nvim-autopairs',
-- autocompletion and its sources -- autocompletion and its sources
use { 'hrsh7th/nvim-cmp', {
requires = { 'hrsh7th/cmp-buffer', 'hrsh7th/nvim-cmp',
dependencies = { 'hrsh7th/cmp-buffer',
-- standalone cmp sources -- standalone cmp sources
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'lukas-reineke/cmp-under-comparator', 'lukas-reineke/cmp-under-comparator',
@ -77,86 +81,89 @@ return require("packer").startup(function(use)
'jay-babu/mason-null-ls.nvim', 'jay-babu/mason-null-ls.nvim',
-- dependencies -- dependencies
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
} },
} },
-- fix for cursorhold function -- fix for cursorhold function
use { 'antoinemadec/fixcursorhold.nvim' } 'antoinemadec/fixcursorhold.nvim',
-- showing color of hex values, etc -- showing color of hex values, etc
use { 'norcalli/nvim-colorizer.lua' } 'norcalli/nvim-colorizer.lua',
-- show tags -- show tags
use { "SmiteshP/nvim-navbuddy", {
requires = { "SmiteshP/nvim-navbuddy",
dependencies = {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
"SmiteshP/nvim-navic", "SmiteshP/nvim-navic",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
} },
} },
-- fileexplorer on the side -- fileexplorer on the side
use { "nvim-tree/nvim-tree.lua", {
requires = { "nvim-tree/nvim-tree.lua",
dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
} },
} },
-- better language highlighting by improved parsing -- better language highlighting by improved parsing
use { 'nvim-treesitter/nvim-treesitter' } 'nvim-treesitter/nvim-treesitter',
-- automatically close html-tags -- automatically close html-tags
use { 'windwp/nvim-ts-autotag', {
requires = { 'nvim-treesitter/nvim-treesitter' } 'windwp/nvim-ts-autotag',
} dependencies = { 'nvim-treesitter/nvim-treesitter' },
},
-- folding improvements -- folding improvements
use { 'kevinhwang91/nvim-ufo', {
requires = 'kevinhwang91/promise-async' } 'kevinhwang91/nvim-ufo',
dependencies = { 'kevinhwang91/promise-async' },
},
-- colorful brackets -- colorful brackets
use { 'luochen1990/rainbow' } 'luochen1990/rainbow',
-- fuzzy finder -- fuzzy finder
use { {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
tag = '0.1.2', version = '0.1.2',
requires = { 'nvim-lua/plenary.nvim' } dependencies = { 'nvim-lua/plenary.nvim' },
} },
-- clean up white spaces and empty lines before writing -- clean up white spaces and empty lines before writing
use { "mcauley-penney/tidy.nvim" } "mcauley-penney/tidy.nvim",
-- todo symbols and highlighting -- todo symbols and highlighting
use { 'folke/todo-comments.nvim', {
requires = { 'nvim-lua/plenary.nvim' } 'folke/todo-comments.nvim',
} dependencies = { 'nvim-lua/plenary.nvim' },
},
-- git wrapper -- git wrapper
use { 'tpope/vim-fugitive' } 'tpope/vim-fugitive',
-- golang language support -- golang language support
use { 'fatih/vim-go', {
ft = { 'go' } 'fatih/vim-go',
} ft = { 'go' },
},
-- markdown language support -- markdown language support
use { 'preservim/vim-markdown', {
ft = { 'md' }, 'preservim/vim-markdown',
requires = { 'godlygeek/tabular' } ft = { 'markdown' },
} dependencies = { 'godlygeek/tabular' },
},
-- bulk renamer -- bulk renamer
use { 'qpkorr/vim-renamer' } 'qpkorr/vim-renamer',
-- additional quote/parantheses funtions -- additional quote/parantheses funtions
use { 'tpope/vim-surround' } 'tpope/vim-surround',
-- colorscheme -- colorscheme
use { 'tiyn/vim-tccs' } 'tiyn/vim-tccs',
})
-- package manager sync (last entry)
if packer_bootstrap then
require('packer').sync()
end
end)

@ -126,8 +126,10 @@ require("mason-null-ls").setup({
require "lsp_signature".setup({ require "lsp_signature".setup({
bind = true, bind = true,
handler_opts = { handler_opts = {
border = "rounded" border = "none"
} },
hint_prefix = "",
hint_scheme = "DiagnosticSignHint",
}) })
-- smiteshp/nvim-navbuddy -- smiteshp/nvim-navbuddy

@ -6,12 +6,12 @@ require 'todo-comments'.setup {
-- keywords recognized as todo comments -- keywords recognized as todo comments
keywords = { keywords = {
ERRO = { icon = "", color = "error" }, ERRO = { icon = "", color = "error" },
TODO = { icon = "", color = "info" },
WARN = { icon = "", color = "warning" }, WARN = { icon = "", color = "warning" },
HACK = { icon = "", color = "warning" }, HACK = { icon = "", color = "warning" },
PERF = { icon = "", color = "perfect" },
HINT = { icon = "", color = "hint" }, HINT = { icon = "", color = "hint" },
INFO = { icon = "", color = "hint", alt = { "NOTE" } }, TODO = { icon = "", color = "hint" },
INFO = { icon = "", color = "info", alt = { "NOTE" } },
PERF = { icon = "", color = "perfect" },
TEST = { icon = "", color = "test" }, TEST = { icon = "", color = "test" },
}, },
gui_style = { gui_style = {
@ -40,10 +40,10 @@ require 'todo-comments'.setup {
colors = { colors = {
error = { "DiagnosticSignError", "ErrorMsg", "#DC2626" }, error = { "DiagnosticSignError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticSignWarn", "WarningMsg", "#FBBF24" }, warning = { "DiagnosticSignWarn", "WarningMsg", "#FBBF24" },
info = { "Comment", "#2563EB" }, hint = { "DiagnosticSignHint", "#10B981" },
hint = { "Constant", "#10B981" }, info = { "DiagnosticSignInfo", "#999999" },
perfect = { "Operator", "#7C3AED" }, perfect = { "Special", "#FF00FF" },
test = { "Function", "#FF00FF" } test = { "Identifier", "#00dddd" }
}, },
search = { search = {
command = "rg", command = "rg",

Loading…
Cancel
Save