[tycho] migrate to lazy

This commit is contained in:
Felix Suchert 2023-10-18 18:05:38 +02:00
parent b9c07b174b
commit 846b59a029
Signed by: feliix42
GPG key ID: 24363525EA0E8A99
4 changed files with 96 additions and 44 deletions

View file

@ -1,13 +1,30 @@
require('plugins') -- plugin manager
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)
-- comma as leader -- comma as leader
vim.g.mapleader = "," vim.g.mapleader = ","
-- load plugins
require('plugins')
-- load legacy options -- load legacy options
vim.cmd([[ vim.cmd([[
" so ~/.config/nvim/legacy.vim " so ~/.config/nvim/legacy.vim
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden' let $FZF_DEFAULT_COMMAND = 'rg --files --hidden'
let g:tex_flavor='latex' let g:tex_flavor='latex'
autocmd FileType hledger setlocal omnifunc=hledger#complete#omnifunc
autocmd FileType ledger setlocal omnifunc=hledger#complete#omnifunc
]]) ]])
require('completion') require('completion')
@ -16,7 +33,7 @@ require('lsp-setup')
-- nvim-treesitter -- nvim-treesitter
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
ensure_installed = { ensure_installed = {
"c", "lua", "vim", "help", "query", "c", "lua", "vim", "query",
"gitattributes", "gitcommit", "gitignore", "gitattributes", "gitcommit", "gitignore",
"json", "markdown", "yaml", "toml", "json", "markdown", "yaml", "toml",
"make", "nix", "bash", "make", "nix", "bash",

31
tycho/nvim/lazy-lock.json Normal file
View file

@ -0,0 +1,31 @@
{
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" },
"cmake-tools.nvim": { "branch": "master", "commit": "4b7a0e79cb72ca01a3106987be45961b5f2dddb6" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"editorconfig-vim": { "branch": "master", "commit": "0d54ea863089fb13be423b4aed6cca35f3a5d778" },
"fzf": { "branch": "master", "commit": "3666448ca649093f6f6b534b67e5a8b865d11a00" },
"fzf.vim": { "branch": "master", "commit": "d1016dbd7cec2d2a3bb5863776c84b4034e4b85e" },
"gruvbox-baby": { "branch": "main", "commit": "be47338877e0536360290d66d26854e90dbc0004" },
"hledger-vim": { "branch": "master", "commit": "165eb483a10fd610bd9cad5d5246e457bf5fe285" },
"lazy.nvim": { "branch": "main", "commit": "b9c604e839e854bc999e99b90319f1b49776aeac" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"neoformat": { "branch": "master", "commit": "aedb6f9d3f53d5da229095f7d761d749f8c5c7e0" },
"nerdcommenter": { "branch": "master", "commit": "d2e21d417f6c788b11ae3b90d7ac478930dead36" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-lspconfig": { "branch": "master", "commit": "e49b1e90c1781ce372013de3fa93a91ea29fc34a" },
"nvim-treesitter": { "branch": "master", "commit": "49e71322db582147ce8f4df1853d9dab08da0826" },
"nvim-web-devicons": { "branch": "master", "commit": "3af745113ea537f58c4b1573b64a429fefad9e07" },
"oil.nvim": { "branch": "master", "commit": "3275996ce65f142d0e96b9fc2658f94e5bd43ad5" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
"vim-fugitive": { "branch": "master", "commit": "cbe9dfa162c178946afa689dd3f42d4ea8bf89c1" },
"vim-nix": { "branch": "master", "commit": "1e8d3cc4d74f40fb384cd1739739543fe117ff61" },
"vim-toml": { "branch": "main", "commit": "d36caa6b1cf508a4df1c691f915572fc02143258" },
"vim-vsnip": { "branch": "master", "commit": "be277461265f1e5c7db470aa479f30956597ea9e" },
"vimtex": { "branch": "master", "commit": "cbb20643b7bfe721902dac5760bf0d4889fb5f7e" }
}

View file

@ -26,6 +26,7 @@ cmp.setup({
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'vsnip' }, -- For vsnip users. { name = 'vsnip' }, -- For vsnip users.
}, { }, {
{ name = 'buffer' }, { name = 'buffer' },

View file

@ -1,60 +1,63 @@
return require('packer').startup(function(use) return require('lazy').setup({
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- theme -- theme
-- use {'morhetz/gruvbox', config = function() vim.cmd.colorscheme("gruvbox") end } -- use {'morhetz/gruvbox', config = function() vim.cmd.colorscheme("gruvbox") end }
use {'luisiacc/gruvbox-baby', config = function() vim.cmd.colorscheme("gruvbox-baby") end } {'luisiacc/gruvbox-baby', config = function() vim.cmd.colorscheme("gruvbox-baby") end },
-- use 'drewtempelmeyer/palenight.vim' -- use 'drewtempelmeyer/palenight.vim'
use { { 'stevedylandev/flexoki-nvim', as = 'flexoki', config = function() vim.cmd.colorscheme("flexoki") end, enabled = false },
-- utility plugins
{ 'nvim-tree/nvim-web-devicons', lazy = true },
{ "nvim-lua/plenary.nvim", lazy = true },
-- UI
{
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
requires = { 'nvim-tree/nvim-web-devicons', opt = true } dependencies = 'nvim-tree/nvim-web-devicons'
} },
use {'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons'} {'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons' },
use 'scrooloose/nerdcommenter' -- commenting and text formatting
use 'sbdchd/neoformat' 'scrooloose/nerdcommenter',
'sbdchd/neoformat',
use { -- directory editing
{
'stevearc/oil.nvim', 'stevearc/oil.nvim',
requires = 'nvim-tree/nvim-web-devicons', dependencies = 'nvim-tree/nvim-web-devicons',
config = function() require('oil').setup() end config = function() require('oil').setup() end
} },
-- fuzzy file finder -- fuzzy file finder
use { 'junegunn/fzf', run = function() vim.fn['fzf#install'](0) end } { 'junegunn/fzf', build = function() vim.fn['fzf#install'](0) end },
use 'junegunn/fzf.vim' 'junegunn/fzf.vim',
-- -- On-demand loading for languages -- On-demand loading for languages
use 'rust-lang/rust.vim' { 'rust-lang/rust.vim', ft = "rust" },
-- use 'cespare/vim-toml { 'cespare/vim-toml', ft = "toml" },
-- use 'keith/swift.vim' -- use 'keith/swift.vim'
-- use 'neovimhaskell/haskell-vim' -- use 'neovimhaskell/haskell-vim'
{ 'Civitasv/cmake-tools.nvim', dependencies = "nvim-lua/plenary.nvim" },
{ 'anekos/hledger-vim' },
-- Post-install/update hook with neovim command -- Treesitter
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
-- LSP plugins -- LSP plugins
use 'neovim/nvim-lspconfig' 'neovim/nvim-lspconfig',
use 'hrsh7th/cmp-nvim-lsp' 'p00f/clangd_extensions.nvim',
use 'hrsh7th/cmp-buffer' 'hrsh7th/cmp-nvim-lsp',
use 'hrsh7th/cmp-path' 'hrsh7th/cmp-buffer',
use 'hrsh7th/cmp-cmdline' 'hrsh7th/cmp-path',
use 'hrsh7th/nvim-cmp' 'hrsh7th/cmp-cmdline',
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-nvim-lsp-signature-help',
-- snippet engine -- snippet engine
use 'hrsh7th/vim-vsnip' 'hrsh7th/vim-vsnip',
use 'tpope/vim-fugitive' 'tpope/vim-fugitive',
-- use 'vim-syntastic/syntastic' 'lervag/vimtex',
-- use 'vim-airline/vim-airline' 'editorconfig/editorconfig-vim',
-- use 'airblade/vim-gitgutter' 'LnL7/vim-nix'
-- use 'justinmk/vim-sneak'
-- use 'lervag/vimtex' -- 'xevz/vim-squirrel'
-- use 'editorconfig/editorconfig-vim' })
-- use 'LnL7/vim-nix'
-- use 'xevz/vim-squirrel'
-- use 'preservim/nerdtree'
--
-- -- ale language server client
-- use 'dense-analysis/ale'
end)