nvim: init
Some checks are pending
Build / Lint Code Base (push) Waiting to run
CI / build (push) Waiting to run

This commit is contained in:
Felix Buehler 2026-01-18 16:03:14 +01:00
parent 2919c8695b
commit 9a319d8bf7
17 changed files with 179 additions and 0 deletions

3
.gitmodules vendored
View file

@ -61,3 +61,6 @@
[submodule "zsh/oh-my-zsh"] [submodule "zsh/oh-my-zsh"]
path = zsh/oh-my-zsh path = zsh/oh-my-zsh
url = https://github.com/ohmyzsh/ohmyzsh.git url = https://github.com/ohmyzsh/ohmyzsh.git
[submodule "nvim/lua/lazy"]
path = nvim/lua/lazy
url = https://github.com/folke/lazy.nvim.git

View file

@ -7,6 +7,7 @@
- create: - create:
- ~/.profile.d - ~/.profile.d
- ~/.local/bin - ~/.local/bin
- ~/.local/share
- ~/.config/alacritty - ~/.config/alacritty
- ~/.config/environment.d - ~/.config/environment.d
- ~/.config/foot - ~/.config/foot
@ -53,6 +54,7 @@
~/.vimrc: vim/vimrc ~/.vimrc: vim/vimrc
~/.vim/pack/dotfiles/start: vim/start ~/.vim/pack/dotfiles/start: vim/start
~/.vim/colors/badwolf.vim: vim/start/badwolf/colors/badwolf.vim ~/.vim/colors/badwolf.vim: vim/start/badwolf/colors/badwolf.vim
~/.config/nvim: nvim
~/.wgetrc: wget/wgetrc ~/.wgetrc: wget/wgetrc
~/.config/yay/config.json: yay/config.json ~/.config/yay/config.json: yay/config.json
~/.Xresources: i3/Xresources ~/.Xresources: i3/Xresources

6
nvim/init.lua Normal file
View file

@ -0,0 +1,6 @@
require("config.lazy")
-- old vim config
vim.opt.number = true
vim.opt.expandtab = true
vim.opt.shiftwidth = 2

12
nvim/lazy-lock.json Normal file
View file

@ -0,0 +1,12 @@
{
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-treesitter": { "branch": "main", "commit": "d19def46c112c26c17adeef88dd1253cc6d623a1" },
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
"onedark.nvim": { "branch": "master", "commit": "213c23ae45a04797572242568d5d51937181792d" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope.nvim": { "branch": "master", "commit": "a8c2223ea6b185701090ccb1ebc7f4e41c4c9784" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }
}

View file

@ -0,0 +1,9 @@
require('gitsigns').setup {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
}

28
nvim/lua/config/lazy.lua Normal file
View file

@ -0,0 +1,28 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("config") .. "/lua/lazy"
if not vim.loop.fs_stat(lazypath) then
-- Submodule should exist, but fail gracefully
vim.notify("lazy.nvim submodule not found!", vim.log.levels.ERROR)
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "onedark" } },
-- automatically check for plugin updates
checker = { enabled = true },
-- disable luarocks
rocks = { enabled = false },
})

View file

@ -0,0 +1,6 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'onedark'
}
}

View file

@ -0,0 +1,32 @@
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
defaults = {
mappings = {
i = {
['<C-u>'] = false,
['<C-d>'] = false,
},
},
},
}
-- Enable telescope fzf native, if installed
require('telescope').load_extension('fzf')
-- See `:help telescope.builtin`
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
end, { desc = '[/] Fuzzily search in current buffer]' })
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })

View file

@ -0,0 +1,15 @@
-- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter`
require('nvim-treesitter').install({
"bash",
"comment",
"json",
"lua",
"markdown_inline",
"markdown",
"python",
"rust",
"vim",
"yaml",
"zsh",
})

1
nvim/lua/lazy Submodule

@ -0,0 +1 @@
Subproject commit 306a05526ada86a7b30af95c5cc81ffba93fef97

View file

@ -0,0 +1,5 @@
return {
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true,
}

View file

@ -0,0 +1,6 @@
return {
'lewis6991/gitsigns.nvim',
config = function()
require("config.gitsigns")
end,
}

View file

@ -0,0 +1,7 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require("config.lualine")
end,
}

View file

@ -0,0 +1,10 @@
return {
"navarasu/onedark.nvim",
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
require('onedark').setup {
style = 'warmer'
}
require('onedark').load()
end
}

View file

@ -0,0 +1,23 @@
return {
'nvim-telescope/telescope.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
-- optional but recommended
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
'nvim-telescope/telescope-fzf-native.nvim',
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = 'make',
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable 'make' == 1
end,
},
},
config = function()
require("config.telescope")
end,
}

View file

@ -0,0 +1,6 @@
return {
"folke/todo-comments.nvim",
event = 'VimEnter',
dependencies = { "nvim-lua/plenary.nvim" },
opts = { signs = false },
}

View file

@ -0,0 +1,8 @@
return {
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate',
config = function()
require("config.treesitter")
end,
}