Modified Neovim Config

This commit is contained in:
Thomas Naderer
2024-12-22 15:33:11 +01:00
parent a396ab2abc
commit 7d89f6fbbc
5 changed files with 153 additions and 73 deletions

View File

@@ -1,16 +1,21 @@
-- Initalize packer
vim.cmd [[packadd packer.nvim]]
vim.g.mapleader = " " -- Set the leader key to space
vim.g.mapleader = ' ' -- Set the leader key to space
vim.cmd [[colorscheme tokyonight]]
-- vim.cmd [[
-- syntax match Todo /TODO\|FIXME\|NOTE\|HACK/
-- highlight link Todo Comment
-- ]]
--TODO Ich bin eine biene
--
require('packer').startup(function(use)
use 'wbthomason/packer.nvim' -- Packer manages itself
-- VIM AutoSave
use({
"okuuva/auto-save.nvim",
'okuuva/auto-save.nvim',
tag = 'v1*',
config = function()
require("auto-save").setup({
require('auto-save').setup({
-- your config goes here
-- or just leave it empty :)
})
@@ -18,19 +23,21 @@ require('packer').startup(function(use)
})
-- Headlines for Markdown and TeX
use {
"lukas-reineke/headlines.nvim",
after = "nvim-treesitter",
'lukas-reineke/headlines.nvim',
after = 'nvim-treesitter',
config = function()
require("headlines").setup()
require('headlines').setup()
end,
}
-- Nvim-Tree
use {
'nvim-tree/nvim-tree.lua',
config = function()
require("nvim-tree").setup()
end
require('plugins.nvim-tree').setup()
end,
}
-- require('plugins.nvim-tree')
-- Themes
use 'gruvbox-community/gruvbox' -- Gruvbox theme
use 'folke/tokyonight.nvim' -- Tokyo Night theme
@@ -57,6 +64,11 @@ require('packer').startup(function(use)
}
require('plugins.lualine')
-- HardTime
use{
'm4xshen/hardtime.nvim',
requires = {"MunifTanjim/nui.nvim"}
}
-- FZF
use {
'junegunn/fzf',
@@ -64,12 +76,19 @@ require('packer').startup(function(use)
}
use 'junegunn/fzf.vim'
use {
"folke/todo-comments.nvim",
requires = "nvim-lua/plenary.nvim",
config = function()
require("todo-comments").setup {}
end
}
-- Cool Startup Dashboard
use {
'glepnir/dashboard-nvim',
requires = { 'kyazdani42/nvim-web-devicons' }
}
-- Productivity
use 'numToStr/Comment.nvim' -- Easy commenting
use 'windwp/nvim-autopairs' -- Auto-close brackets, quotes, etc.

View File

@@ -1,24 +1,12 @@
-- File: ~/.config/nvim/lua/plugins/nvim-tree.lua
local M = {}
-- Keybinding to toggle Nvim Tree
function M.setup()
vim.api.nvim_set_keymap('n', '<leader>e', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
-- Nvim Tree Configuration
require("nvim-tree").setup({
require("nvim-tree").setup({
view = {
width = 35,
side = "left",
adaptive_size = true,
mappings = {
list = {
{ key = "l", action = "edit" },
{ key = "h", action = "close_node" },
{ key = "v", action = "vsplit" },
{ key = "a", action = "create" },
{ key = "d", action = "remove" },
{ key = "r", action = "rename" },
},
},
},
renderer = {
highlight_git = true,
@@ -70,4 +58,7 @@ require("nvim-tree").setup({
enable = true,
ignore = false,
},
})
})
end
return M

View File

@@ -0,0 +1,20 @@
-- plugins/outline.lua
local M = {}
M.setup = function()
vim.api.nvim_set_keymap('n', '<leader>o', ':Outline<CR>', { noremap = true, silent = true })
require('outline').setup({
show_guides = true, -- Show outline guides
auto_close = false, -- Do not auto-close the outline
auto_open = true, -- Automatically open the outline
preview_lines = 10, -- Number of preview lines to show
keymaps = { -- Custom key mappings for the outline
jump = 'o', -- Jump to the selected item
expand_collapse = 'u', -- Expand or collapse an item
},
})
end
return M

View File

@@ -0,0 +1,29 @@
-- Rainbow Delimiters Configuration
local rainbow_delimiters = require 'rainbow-delimiters'
---@type rainbow_delimiters.config
vim.g.rainbow_delimiters = {
strategy = {
[''] = rainbow_delimiters.strategy['global'],
vim = rainbow_delimiters.strategy['local'],
},
query = {
[''] = 'rainbow-delimiters',
lua = 'rainbow-blocks',
},
priority = {
[''] = 110,
lua = 210,
},
highlight = {
'RainbowDelimiterRed',
'RainbowDelimiterYellow',
'RainbowDelimiterBlue',
'RainbowDelimiterOrange',
'RainbowDelimiterGreen',
'RainbowDelimiterViolet',
'RainbowDelimiterCyan',
},
}

View File

@@ -0,0 +1,21 @@
require("todo-comments").setup {
signs = true, -- show icons in the signs column
keywords = {
TODO = { icon = "", color = "info" },
FIXME = { icon = "", color = "error" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning" },
NOTE = { icon = "", color = "hint" },
},
highlight = {
before = "fg", -- highlight the keyword
keyword = "wide", -- highlight the whole keyword
after = "fg", -- highlight the message
},
search = {
command = "rg", -- ripgrep as the default search command
args = {
"--color=never", "--no-heading", "--with-filename", "--line-number", "--column"
},
},
}