First draft after switching to lazy.nvim

This commit is contained in:
Fabian Schmidt
2023-02-24 21:11:27 +01:00
parent 6a51019731
commit 717c7f09e5
10 changed files with 235 additions and 223 deletions

View File

@@ -1,70 +0,0 @@
-- plugin.lua
require 'paq' {
-- Handle itself
'savq/paq-nvim';
-- Theme
'kyazdani42/nvim-web-devicons';
{ 'folke/tokyonight.nvim', { branch = 'main' } };
'tiagovla/tokyodark.nvim';
'rebelot/kanagawa.nvim';
'sainnhe/everforest';
'navarasu/onedark.nvim';
'rose-pine/neovim';
'rmehri01/onenord.nvim';
'EdenEast/nightfox.nvim';
'tanvirtin/monokai.nvim';
'catppuccin/nvim';
'briones-gabriel/darcula-solid.nvim';
'rktjmp/lush.nvim';
-- treesitter
'nvim-treesitter/nvim-treesitter';
'nvim-treesitter/playground';
-- Utils
'akinsho/nvim-bufferline.lua';
'hoob3rt/lualine.nvim';
'j-hui/fidget.nvim';
'airblade/vim-gitgutter';
'nvim-lua/popup.nvim';
'nvim-lua/plenary.nvim';
-- File Navigation
'kyazdani42/nvim-tree.lua';
'nvim-telescope/telescope.nvim';
-- lsp
'williamboman/mason.nvim';
'williamboman/mason-lspconfig.nvim';
'neovim/nvim-lspconfig';
'onsails/lspkind-nvim'; -- pictograms
'simrat39/rust-tools.nvim';
-- completion
'hrsh7th/cmp-nvim-lsp';
'hrsh7th/cmp-nvim-lsp-signature-help';
'hrsh7th/cmp-buffer';
'hrsh7th/cmp-path';
'hrsh7th/cmp-nvim-lua';
'hrsh7th/cmp-cmdline';
'hrsh7th/nvim-cmp';
-- snippets needed for cmp
'L3MON4D3/LuaSnip';
'saadparwaiz1/cmp_luasnip';
-- autopair
'windwp/nvim-autopairs';
-- Linting & formtatting
'jose-elias-alvarez/null-ls.nvim';
-- writing
'vimwiki/vimwiki';
'junegunn/goyo.vim';
'junegunn/limelight.vim';
}

28
lua/plugins/lsp.lua Normal file
View File

@@ -0,0 +1,28 @@
return {
-- lsp
{ 'williamboman/mason.nvim' },
{ 'williamboman/mason-lspconfig.nvim' },
{ 'neovim/nvim-lspconfig' },
{ 'simrat39/rust-tools.nvim' },
{ 'onsails/lspkind-nvim' }, -- pictograms replace (?) with lspsaga
{ 'j-hui/fidget.nvim' }, -- show lsp status
-- completion
{
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/cmp-cmdline',
-- snippets needed for cmp
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
'windwp/nvim-autopairs',
}
}
}
-- -- Linting & formtatting
-- 'jose-elias-alvarez/null-ls.nvim';

View File

@@ -0,0 +1,67 @@
return {
{
'nvim-telescope/telescope.nvim',
tag = '0.1.1',
dependencies = { 'nvim-lua/plenary.nvim' },
},
{
'nvim-tree/nvim-tree.lua',
config = function ()
require('nvim-tree').setup {
disable_netrw = true,
hijack_netrw = true,
open_on_setup = false,
ignore_ft_on_setup = {},
open_on_tab = false,
hijack_cursor = false,
update_cwd = true,
hijack_directories = {
enable = true,
auto_open = true,
},
diagnostics = {
enable = false,
icons = {
hint = "",
info = "",
warning = "",
error = "",
}
},
update_focused_file = {
enable = false,
update_cwd = false,
ignore_list = {}
},
system_open = {
cmd = nil,
args = {}
},
filters = {
dotfiles = false,
custom = {}
},
git = {
enable = true,
ignore = true,
timeout = 500,
},
view = {
width = 30,
hide_root_folder = false,
side = 'left',
mappings = {
custom_only = false,
list = {}
}
},
actions = {
open_file = {
resize_window = false
}
}
}
end,
dependencies = { 'nvim-tree/nvim-web-devicons' }
}
}

52
lua/plugins/style.lua Normal file
View File

@@ -0,0 +1,52 @@
return {
{
'rebelot/kanagawa.nvim',
config = function()
vim.opt.guifont = 'Source Code Pro for Powerline'
vim.g.limelight_conceal_ctermfg = 'gray'
vim.cmd('colorscheme kanagawa')
vim.cmd('set termguicolors')
vim.opt.syntax = 'on'
end
},
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { "html" }
}
}
end,
dependencies = { 'nvim-treesitter/playground' }
},
{
'akinsho/bufferline.nvim',
tag = "v3.3.0",
config = true,
dependencies = { 'nvim-tree/nvim-web-devicons' }
},
{
'hoob3rt/lualine.nvim',
config = function()
require('lualine').setup {
options = {
theme = 'kanagawa'
}
}
end
},
{ 'lewis6991/gitsigns.nvim' },
{
'glepnir/dashboard-nvim',
event = 'VimEnter',
config = true,
dependencies = { 'nvim-tree/nvim-web-devicons' }
},
}

11
lua/plugins/writing.lua Normal file
View File

@@ -0,0 +1,11 @@
return {
-- writing
{
'vimwiki/vimwiki',
config = function()
vim.g.vimwiki_list = { { path = '~/Documents/Buch/wiki', syntax = 'markdown', ext = '.md' } }
end
},
{ 'junegunn/goyo.vim' }, -- try raplcing these 2 at some point because they don't work that well anymore
{ 'junegunn/limelight.vim' },
}

View File

@@ -2,47 +2,9 @@
local settings = {}
function settings.initMisc()
vim.opt.backup = false
vim.opt.undodir = '/Users/fschmidt/.cache/nvim/undodir'
vim.opt.swapfile = false
vim.opt.undofile = true
vim.opt.smartcase = true
vim.opt.ignorecase = true
vim.opt.laststatus = 2
vim.opt.hidden = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.scrolloff = 12
vim.opt.sidescrolloff = 8
vim.opt.mouse = 'a'
vim.opt.autochdir = true
vim.opt.clipboard = 'unnamed,unnamedplus'
vim.opt.number = true
vim.opt.wrap = false
vim.opt.signcolumn = 'yes:2'
vim.opt.list = true
vim.opt.listchars = 'tab:▸ ,trail:·'
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.expandtab = false
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.completeopt = { "menu", "menuone", "noselect" }
end
function settings.initVimWiki()
vim.g.vimwiki_list = { { path = '~/Documents/Buch/wiki', syntax = 'markdown', ext = '.md' } }
end
function settings.init()
settings.initMisc()
settings.initVimWiki()
require('settings.theme').init()
require('settings.lsp').init()
require('settings.completion')
require('settings.tree')
require('settings.luasnip')
end

View File

@@ -1,51 +0,0 @@
-- Theming
local theme = {}
function theme.initFont()
vim.opt.guifont = 'Source Code Pro for Powerline'
end
function theme.lsp_status()
require('fidget').setup {}
end
function theme.initStatusline()
require('lualine').setup {
options = {
theme = 'kanagawa'
}
}
end
function theme.initBufferline()
local bufferline = require 'bufferline'
bufferline.setup()
end
function theme.initColorscheme()
vim.g.limelight_conceal_ctermfg = 'gray'
vim.cmd 'colorscheme kanagawa'
vim.cmd 'set termguicolors'
vim.opt.syntax = 'on'
require('nvim-treesitter.configs').setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { "html" }
}
}
end
function theme.init()
theme.initFont()
theme.lsp_status()
theme.initStatusline()
theme.initBufferline()
theme.initColorscheme()
end
return theme

View File

@@ -1,60 +0,0 @@
-- Tree
local tree = {}
require('nvim-tree').setup {
disable_netrw = true,
hijack_netrw = true,
open_on_setup = false,
ignore_ft_on_setup = {},
open_on_tab = false,
hijack_cursor = false,
update_cwd = true,
hijack_directories = {
enable = true,
auto_open = true,
},
diagnostics = {
enable = false,
icons = {
hint = "",
info = "",
warning = "",
error = "",
}
},
update_focused_file = {
enable = false,
update_cwd = false,
ignore_list = {}
},
system_open = {
cmd = nil,
args = {}
},
filters = {
dotfiles = false,
custom = {}
},
git = {
enable = true,
ignore = true,
timeout = 500,
},
view = {
width = 30,
hide_root_folder = false,
side = 'left',
mappings = {
custom_only = false,
list = {}
}
},
actions = {
open_file = {
resize_window = false
}
}
}
return tree