1- -- Install lazy.nvim automatically if not present
2- local lazypath = vim .fn .stdpath (" data" ) .. " /lazy/lazy.nvim"
3- if not vim .uv .fs_stat (lazypath ) then
4- vim .fn .system ({
5- " git" ,
6- " clone" ,
7- " --filter=blob:none" ,
8- " --branch=stable" ,
9- " https://github.com/folke/lazy.nvim.git" ,
10- lazypath ,
11- })
12- end
13- vim .opt .rtp :prepend (lazypath )
1+ ---- ---------------
2+ -- Configuration --
3+ ---- ---------------
144
155-- Set leader before loading lazy.nvim to ensure correct mappings
166vim .g .mapleader = " "
177-- Prevent leader being overriden by a keybind
188vim .keymap .set (" n" , " <Space>" , " <Nop>" , { noremap = true , silent = true })
199
20- ---- ---------
21- -- Plugins --
22- ---- ---------
23-
24- require (" lazy" ).setup ({
25- { " catppuccin/nvim" , name = " catppuccin" , priority = 1000 },
26- { " hrsh7th/nvim-cmp" , dependencies = { " hrsh7th/cmp-nvim-lsp" } },
27- { " neovim/nvim-lspconfig" , dependencies = { " hrsh7th/cmp-nvim-lsp" } },
28- { " nvim-treesitter/nvim-treesitter" , build = " :TSUpdate" },
29- { " stevearc/conform.nvim" },
30- { " nvim-tree/nvim-web-devicons" , lazy = true },
31- {
32- " nvim-lualine/lualine.nvim" ,
33- dependencies = { " nvim-tree/nvim-web-devicons" },
34- opts = {
35- options = {
36- theme = " catppuccin" ,
37- },
38- },
39- },
40- {
41- " nvim-telescope/telescope.nvim" ,
42- tag = " 0.1.8" ,
43- dependencies = { " nvim-lua/plenary.nvim" },
44- opts = {
45- extensions = {
46- file_browser = {
47- collapse_dirs = true ,
48- grouped = true ,
49- hijack_netrw = true ,
50- display_stat = false ,
51- },
52- },
53- },
54- },
55- {
56- " nvim-telescope/telescope-file-browser.nvim" ,
57- dependencies = { " nvim-telescope/telescope.nvim" , " nvim-lua/plenary.nvim" },
58- },
59- {
60- " folke/which-key.nvim" ,
61- event = " VeryLazy" ,
62- keys = {
63- {
64- " <leader>?" ,
65- function ()
66- require (" which-key" ).show ({ global = false })
67- end ,
68- desc = " Buffer Local Keymaps (which-key)" ,
69- },
70- },
71- },
72- })
73-
74- ---- ---------------
75- -- Configuration --
76- ---- ---------------
77-
7810-- General
7911vim .opt .undofile = true -- Enable persistent undo
8012
8517
8618-- Completion
8719vim .opt .complete :append (" kspell" ) -- Complete with dictionary
20+ vim .opt .completeopt :append (" menuone" ) -- Show popup with single item to show more info
21+ vim .opt .completeopt :append (" fuzzy" ) -- Enable fuzzy completion
8822vim .opt .matchpairs :append (" <:>" ) -- Match XML
8923vim .opt .updatetime = 250 -- Decreases delay before showing plugin completions
24+ vim .opt .winborder = " rounded" -- Borders for help windows
9025
9126-- Formatting
9227vim .opt .expandtab = true -- Always use spaces
@@ -113,6 +48,9 @@ vim.opt.inccommand = "split" -- Preview substitutions
11348vim .opt .cursorline = true -- Highlight current line (increases redraw time)
11449vim .opt .signcolumn = " yes" -- Reserve sign space (Git, LSP) in gutter to avoid layout shift
11550
51+ -- Diagnostic
52+ vim .diagnostic .config ({ virtual_text = true })
53+
11654-- netrw
11755vim .g .netrw_banner = 0 -- Disable netrw banner
11856vim .g .netrw_winsize = 25 -- Set netrw window size to 25%
@@ -164,3 +102,87 @@ vim.keymap.set("n", "<F8>", ":setlocal spell! spelllang=de_at spell?<CR>", {
164102
165103-- Command to save file with sudo
166104vim .api .nvim_create_user_command (" W" , " w !sudo tee > /dev/null %" , {})
105+
106+ ---- ---------
107+ -- Plugins --
108+ ---- ---------
109+
110+ -- Install lazy.nvim automatically if not present
111+ local lazypath = vim .fn .stdpath (" data" ) .. " /lazy/lazy.nvim"
112+ if not vim .uv .fs_stat (lazypath ) then
113+ vim .fn .system ({
114+ " git" ,
115+ " clone" ,
116+ " --filter=blob:none" ,
117+ " --branch=stable" ,
118+ " https://github.com/folke/lazy.nvim.git" ,
119+ lazypath ,
120+ })
121+ end
122+ vim .opt .rtp :prepend (lazypath )
123+
124+ require (" lazy" ).setup ({
125+ { " catppuccin/nvim" , name = " catppuccin" , priority = 1000 },
126+ { " neovim/nvim-lspconfig" , dependencies = { " hrsh7th/cmp-nvim-lsp" } },
127+ {
128+ " hrsh7th/nvim-cmp" ,
129+ dependencies = {
130+ " hrsh7th/cmp-nvim-lsp" ,
131+ " hrsh7th/cmp-nvim-lsp-signature-help" ,
132+ " hrsh7th/cmp-path" ,
133+ },
134+ },
135+ { " nvim-treesitter/nvim-treesitter" , build = " :TSUpdate" },
136+ { " stevearc/conform.nvim" },
137+ { " nvim-tree/nvim-web-devicons" , lazy = true },
138+ {
139+ " nvim-lualine/lualine.nvim" ,
140+ dependencies = { " nvim-tree/nvim-web-devicons" },
141+ opts = {
142+ options = {
143+ theme = " catppuccin" ,
144+ },
145+ },
146+ },
147+ {
148+ " nvim-telescope/telescope.nvim" ,
149+ tag = " 0.1.8" ,
150+ dependencies = { " nvim-lua/plenary.nvim" },
151+ opts = {
152+ extensions = {
153+ file_browser = {
154+ collapse_dirs = true ,
155+ grouped = true ,
156+ hidden = { file_browser = true , folder_browser = true },
157+ hijack_netrw = true ,
158+ display_stat = false ,
159+ },
160+ },
161+ },
162+ },
163+ {
164+ " nvim-telescope/telescope-file-browser.nvim" ,
165+ dependencies = { " nvim-telescope/telescope.nvim" , " nvim-lua/plenary.nvim" },
166+ },
167+ {
168+ " folke/todo-comments.nvim" ,
169+ dependencies = { " nvim-lua/plenary.nvim" },
170+ keys = {
171+ { " fc" , " <cmd>TodoTelescope<cr>" , desc = " [F]ind [C]omments" },
172+ },
173+ opts = {},
174+ },
175+ {
176+ " folke/which-key.nvim" ,
177+ event = " VeryLazy" ,
178+ keys = {
179+ {
180+ " <leader>?" ,
181+ function ()
182+ require (" which-key" ).show ({ global = false })
183+ end ,
184+ desc = " Buffer Local Keymaps (which-key)" ,
185+ },
186+ },
187+ },
188+ })
0 commit comments