Hooray, lazy.nvim

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

5
.gitignore vendored

@ -1,7 +1,4 @@
karabiner/automatic_backups/* nvim/lazy-lock.json
lazygit/state.yml
nvim/.netrwhist
nvim/plugin/*
office/mutt/cache/* office/mutt/cache/*
office/mutt/tmp/* office/mutt/tmp/*
office/vdirsyncer/status/* 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: # prepend imap-ones with http:// and smtp-ones with smtp://), then:
mbsync -a mbsync -a
mu init -m ~/Mail mu init -m /Users/webgefrickel/Mail
mu index 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 local g = vim.g
g.floaterm_width = 0.98 g.floaterm_width = 0.98
@ -8,4 +7,5 @@ g.floaterm_autoclose = 1
g.floaterm_opener = 'edit' g.floaterm_opener = 'edit'
g.floaterm_borderchars = '─│─│╭╮╯╰' g.floaterm_borderchars = '─│─│╭╮╯╰'
g.floaterm_title = '' 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', 'jsonc',
'lua', 'lua',
'markdown', 'markdown',
-- 'norg',
'php', 'php',
'python', 'python',
'regex', '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 -- helper function for easier mappings
local map = function(mode, lhs, rhs, opts) local map = function(mode, lhs, rhs, opts)
return vim.api.nvim_set_keymap(mode, lhs, rhs, vim.tbl_extend('keep', opts or {}, { 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.showmatch = true
set.sidescroll = 10 set.sidescroll = 10
set.sidescrolloff = 5 set.sidescrolloff = 5
set.signcolumn = 'number'
set.smartcase = true set.smartcase = true
set.splitright = true set.splitright = true
set.splitbelow = true set.splitbelow = true

@ -1,54 +1,69 @@
local fn = vim.fn -- using folke/lazy.nvim as package manager
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
function get_config(name) if not vim.loop.fs_stat(lazypath) then
return string.format('require("config/%s")', name) vim.fn.system({
end 'git', 'clone', '--filter=blob:none',
'https://github.com/folke/lazy.nvim.git', '--branch=stable',
-- bootstrapping / downloading packer. run :PackerSync afterwards if sth. fails lazypath,
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
}) })
end end
return require('packer').startup(function(use) vim.opt.rtp:prepend(lazypath)
-- packer for plugin management itself
use 'wbthomason/packer.nvim'
-- Treesitter for nicer syntax-highlighting -- Make sure to set `mapleader` before lazy so your mappings are correct
use { vim.api.nvim_set_keymap('n', '<space>', '', {})
'nvim-treesitter/nvim-treesitter', vim.g.mapleader = ' '
config = get_config('treesitter'), vim.g.maplocalleader = ' '
run = ':TSUpdate',
} 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. { -- Treesitter for nicer syntax-highlighting
use 'nvim-treesitter/nvim-treesitter-textobjects' 'nvim-treesitter/nvim-treesitter',
use { 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', 'ur4ltz/surround.nvim',
config = get_config('surround'), opts = { mappings_style = 'surround' },
} },
-- lsp and null-ls for diagnostics and formatting (eslint_d, stylelint etc.) { -- 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 -- remember to install all those tools in the cli, see ../../install/3_vimux.sh
use {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
config = get_config('lspconfig'), init = function() require('config/lspconfig') end,
} },
use {
{
'jose-elias-alvarez/null-ls.nvim', 'jose-elias-alvarez/null-ls.nvim',
config = get_config('null-ls'), dependencies = { 'nvim-lua/plenary.nvim' },
requires = { 'nvim-lua/plenary.nvim' }, init = function() require('config/null-ls') end,
} },
-- autocompletion and snippets { -- autocompletion and snippets
use {
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
config = get_config('cmp'), dependencies = {
requires = {
'andersevenrud/cmp-tmux', 'andersevenrud/cmp-tmux',
'hrsh7th/cmp-buffer', 'hrsh7th/cmp-buffer',
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-cmdline',
@ -57,100 +72,62 @@ return require('packer').startup(function(use)
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-vsnip',
}, },
} init = function() require('config/cmp') end,
use { },
{
'hrsh7th/vim-vsnip', 'hrsh7th/vim-vsnip',
config = get_config('vsnip'), init = function() require('config/vsnip') end,
} },
use { {
'rafamadriz/friendly-snippets', 'rafamadriz/friendly-snippets',
requires = { dependencies = {
'hrsh7th/vim-vsnip', 'hrsh7th/vim-vsnip',
}, },
} },
-- floating-terminal integration for nnn, lazygit etc. { -- floating-terminal integration for nnn, lazygit etc.
use {
'voldikss/vim-floaterm', 'voldikss/vim-floaterm',
config = get_config('floaterm'), init = function() require('config/floaterm') end,
} },
-- fzf integration { -- fzf integration
use {
'ibhagwan/fzf-lua', 'ibhagwan/fzf-lua',
config = get_config('fzf'), dependencies = { 'kyazdani42/nvim-web-devicons' },
requires = { 'kyazdani42/nvim-web-devicons' }, init = function() require('config/fzf') end,
} },
-- autopairs for sensible () "" '' { -- colorizer for nice css-colors
use {
'windwp/nvim-autopairs',
config = get_config('autopairs'),
}
-- colorizer for nice css-colors
use {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
config = get_config('colorizer'),
event = 'BufReadPre', event = 'BufReadPre',
} opts = {
css = { css = true },
-- commenting stuff out scss = { css = true },
use { json = { css = true},
'numToStr/Comment.nvim', json5 = { css = true, },
config = get_config('comment'), javascript = { css = true },
} },
},
-- nice status line { -- nice status line
use {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
config = get_config('lualine'), dependencies = { 'kyazdani42/nvim-web-devicons' },
requires = { 'kyazdani42/nvim-web-devicons' },
event = 'VimEnter', event = 'VimEnter',
} opts = { options = { theme = 'gruvbox' } },
},
-- leap for stupidly nice navigation { -- leap for stupidly nice navigation
use {
'ggandor/leap.nvim', 'ggandor/leap.nvim',
config = get_config('leap'),
event = 'BufReadPre', event = 'BufReadPre',
} init = function() require('leap').set_default_keymaps() end,
},
-- finally: the colorscheme of choice
use {
'ellisonleao/gruvbox.nvim',
requires = { 'rktjmp/lush.nvim' },
}
-- Evaluating... -- Evaluating...
use { {
'rcarriga/nvim-notify', 'rcarriga/nvim-notify',
config = get_config('notify'), init = function() vim.notify = require('notify') end,
} },
use { {
'folke/trouble.nvim', 'folke/trouble.nvim',
config = get_config('trouble'), dependencies = { 'kyazdani42/nvim-web-devicons' },
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)

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

Loading…
Cancel
Save