Hooray, lazy.nvim

main
Steffen Rademacker 1 year ago
parent 6873a08ffd
commit 5d15652835

5
.gitignore vendored

@ -1,7 +1,4 @@
karabiner/automatic_backups/*
lazygit/state.yml
nvim/.netrwhist
nvim/plugin/*
nvim/lazy-lock.json
office/mutt/cache/*
office/mutt/tmp/*
office/vdirsyncer/status/*

@ -1 +1 @@
extension="/opt/homebrew/Cellar/php/8.2.4/pecl/20220829/imagick.so"
extension="/opt/homebrew/Cellar/php/8.2.5/pecl/20220829/imagick.so"

@ -28,5 +28,5 @@ ln -s ~/dotfiles/office/msmtprc ~/.msmtprc
# prepend imap-ones with http:// and smtp-ones with smtp://), then:
mbsync -a
mu init -m ~/Mail
mu init -m /Users/webgefrickel/Mail
mu index

@ -1 +0,0 @@
require('nvim-autopairs').setup({})

@ -1,7 +0,0 @@
require('colorizer').setup({
'css';
'scss';
'json';
'json5';
'javascript';
}, { css = true })

@ -1 +0,0 @@
require('Comment').setup({})

@ -1,4 +1,3 @@
local cmd = vim.cmd
local g = vim.g
g.floaterm_width = 0.98
@ -8,4 +7,5 @@ g.floaterm_autoclose = 1
g.floaterm_opener = 'edit'
g.floaterm_borderchars = '─│─│╭╮╯╰'
g.floaterm_title = ''
cmd("au VimEnter * highlight FloatermBorder guibg='#282828' guifg='#fbf1c7'")
vim.cmd("au VimEnter * highlight FloatermBorder guibg='#282828' guifg='#fbf1c7'")

@ -1 +0,0 @@
require('gitsigns').setup({})

@ -1,2 +0,0 @@
-- require('leap').setup({})
require('leap').set_default_keymaps()

@ -1,5 +0,0 @@
require('lualine').setup({
options = {
theme = 'gruvbox',
},
})

@ -1,18 +0,0 @@
require('neorg').setup({
load = {
["core.defaults"] = {},
["core.norg.concealer"] = {},
["core.norg.completion"] = {
config = {
engine = "nvim-cmp",
},
},
["core.norg.dirman"] = {
config = {
workspaces = {
default = "~/Notes",
},
},
},
},
})

@ -1 +0,0 @@
vim.notify = require('notify')

@ -1,3 +0,0 @@
require('surround').setup({
mappings_style = 'surround'
})

@ -12,7 +12,6 @@ require('nvim-treesitter.configs').setup({
'jsonc',
'lua',
'markdown',
-- 'norg',
'php',
'python',
'regex',

@ -1 +0,0 @@
require('trouble').setup({})

@ -1,8 +1,3 @@
-- set the leader key to space
vim.api.nvim_set_keymap('n', '<space>', '', {})
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- helper function for easier mappings
local map = function(mode, lhs, rhs, opts)
return vim.api.nvim_set_keymap(mode, lhs, rhs, vim.tbl_extend('keep', opts or {}, {

@ -38,7 +38,6 @@ set.showbreak = '\\\\\\\\'
set.showmatch = true
set.sidescroll = 10
set.sidescrolloff = 5
set.signcolumn = 'number'
set.smartcase = true
set.splitright = true
set.splitbelow = true

@ -1,54 +1,69 @@
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
function get_config(name)
return string.format('require("config/%s")', name)
end
-- bootstrapping / downloading packer. run :PackerSync afterwards if sth. fails
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim',
install_path
-- using folke/lazy.nvim as package 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',
lazypath,
})
end
return require('packer').startup(function(use)
-- packer for plugin management itself
use 'wbthomason/packer.nvim'
vim.opt.rtp:prepend(lazypath)
-- Treesitter for nicer syntax-highlighting
use {
'nvim-treesitter/nvim-treesitter',
config = get_config('treesitter'),
run = ':TSUpdate',
}
-- Make sure to set `mapleader` before lazy so your mappings are correct
vim.api.nvim_set_keymap('n', '<space>', '', {})
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
require('lazy').setup({
-- The colorscheme of choice
{ 'ellisonleao/gruvbox.nvim', priority = 1000 },
-- plugins that need no further config/dependencies
-- oldschool, non-lua plugins
'AndrewRadev/splitjoin.vim',
'christoomey/vim-tmux-navigator',
'editorconfig/editorconfig-vim',
'tpope/vim-ragtag',
'tpope/vim-repeat',
'wincent/terminus',
-- lua plugins using just the plain default config
{ 'numToStr/Comment.nvim', config = true },
{ 'windwp/nvim-autopairs', config = true },
{ 'lewis6991/gitsigns.nvim', config = true },
-- textobjects, surround, for stuff like cs", cib etc.
use 'nvim-treesitter/nvim-treesitter-textobjects'
use {
{ -- Treesitter for nicer syntax-highlighting
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
init = function() require('config/treesitter') end,
},
{
'nvim-treesitter/nvim-treesitter-textobjects',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
},
{ -- textobjects, surround, for stuff like cs", cib etc.
'ur4ltz/surround.nvim',
config = get_config('surround'),
}
opts = { mappings_style = 'surround' },
},
-- lsp and null-ls for diagnostics and formatting (eslint_d, stylelint etc.)
-- remember to install all those tools in the cli, see ../../install/3_vimux.sh
use {
{ -- lsp and null-ls for diagnostics and formatting (eslint_d, stylelint etc.)
-- remember to install all those tools in the cli, see ../../install/3_vimux.sh
'neovim/nvim-lspconfig',
config = get_config('lspconfig'),
}
use {
init = function() require('config/lspconfig') end,
},
{
'jose-elias-alvarez/null-ls.nvim',
config = get_config('null-ls'),
requires = { 'nvim-lua/plenary.nvim' },
}
dependencies = { 'nvim-lua/plenary.nvim' },
init = function() require('config/null-ls') end,
},
-- autocompletion and snippets
use {
{ -- autocompletion and snippets
'hrsh7th/nvim-cmp',
config = get_config('cmp'),
requires = {
dependencies = {
'andersevenrud/cmp-tmux',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-cmdline',
@ -57,100 +72,62 @@ return require('packer').startup(function(use)
'hrsh7th/cmp-path',
'hrsh7th/cmp-vsnip',
},
}
use {
init = function() require('config/cmp') end,
},
{
'hrsh7th/vim-vsnip',
config = get_config('vsnip'),
}
use {
init = function() require('config/vsnip') end,
},
{
'rafamadriz/friendly-snippets',
requires = {
dependencies = {
'hrsh7th/vim-vsnip',
},
}
},
-- floating-terminal integration for nnn, lazygit etc.
use {
{ -- floating-terminal integration for nnn, lazygit etc.
'voldikss/vim-floaterm',
config = get_config('floaterm'),
}
init = function() require('config/floaterm') end,
},
-- fzf integration
use {
{ -- fzf integration
'ibhagwan/fzf-lua',
config = get_config('fzf'),
requires = { 'kyazdani42/nvim-web-devicons' },
}
-- autopairs for sensible () "" ''
use {
'windwp/nvim-autopairs',
config = get_config('autopairs'),
}
-- colorizer for nice css-colors
use {
dependencies = { 'kyazdani42/nvim-web-devicons' },
init = function() require('config/fzf') end,
},
{ -- colorizer for nice css-colors
'norcalli/nvim-colorizer.lua',
config = get_config('colorizer'),
event = 'BufReadPre',
}
-- commenting stuff out
use {
'numToStr/Comment.nvim',
config = get_config('comment'),
}
opts = {
css = { css = true },
scss = { css = true },
json = { css = true},
json5 = { css = true, },
javascript = { css = true },
},
},
-- nice status line
use {
{ -- nice status line
'nvim-lualine/lualine.nvim',
config = get_config('lualine'),
requires = { 'kyazdani42/nvim-web-devicons' },
dependencies = { 'kyazdani42/nvim-web-devicons' },
event = 'VimEnter',
}
opts = { options = { theme = 'gruvbox' } },
},
-- leap for stupidly nice navigation
use {
{ -- leap for stupidly nice navigation
'ggandor/leap.nvim',
config = get_config('leap'),
event = 'BufReadPre',
}
-- finally: the colorscheme of choice
use {
'ellisonleao/gruvbox.nvim',
requires = { 'rktjmp/lush.nvim' },
}
init = function() require('leap').set_default_keymaps() end,
},
-- Evaluating...
use {
{
'rcarriga/nvim-notify',
config = get_config('notify'),
}
use {
init = function() vim.notify = require('notify') end,
},
{
'folke/trouble.nvim',
config = get_config('trouble'),
requires = { 'kyazdani42/nvim-web-devicons' },
}
use {
'lewis6991/gitsigns.nvim',
config = get_config('gitsigns'),
}
-- use {
-- 'nvim-neorg/neorg',
-- config = get_config('neorg'),
-- requires = { 'nvim-lua/plenary.nvim' },
-- }
-- oldschool vimscript plugins that still provide a lot of value
use 'christoomey/vim-tmux-navigator'
use 'editorconfig/editorconfig-vim'
use 'tpope/vim-repeat'
use 'tpope/vim-ragtag'
use 'wincent/terminus'
-- automatically set up configuration after cloning packer.nvim
if packer_bootstrap then
require('packer').sync()
end
end)
dependencies = { 'kyazdani42/nvim-web-devicons' },
},
})

@ -30,7 +30,7 @@ alias vdiff='$EDITOR -d'
alias vi=$EDITOR
alias vim=$EDITOR
alias vimdiff='$EDITOR -d'
alias vimup='nvim +PackerSync +TSUpdate'
alias vimup='nvim +TSUpdate'
alias yb='yarn build'
alias yp='yarn lint && yarn production'
alias yre='rm -f yarn.lock && rm -rf node_modules && yarn'

Loading…
Cancel
Save