(nvim): Add neovim plugin configuration.
This commit is contained in:
parent
eff5f742bc
commit
f492d4469f
@ -7,3 +7,10 @@ vim-lightline.tar.gz
|
|||||||
{{- if (and (ne .chezmoi.hostname "docker-ce-ubuntu-2gb-nbg1-1") (ne .chezmoi.hostname "nb4113"))}}
|
{{- if (and (ne .chezmoi.hostname "docker-ce-ubuntu-2gb-nbg1-1") (ne .chezmoi.hostname "nb4113"))}}
|
||||||
.local/share/bash-completion/completions/rustup
|
.local/share/bash-completion/completions/rustup
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if eq .chezmoi.os "windows" }}
|
||||||
|
.config/nvim
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .chezmoi.os "linux" }}
|
||||||
|
AppData/
|
||||||
|
{{- end }}
|
||||||
|
|||||||
2
.chezmoitemplates/nvim/init.lua
Normal file
2
.chezmoitemplates/nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
require("config.lazy")
|
||||||
|
require("config.keymaps")
|
||||||
14
.chezmoitemplates/nvim/lazy-lock.json
Normal file
14
.chezmoitemplates/nvim/lazy-lock.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" },
|
||||||
|
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "a9bc587e9ae0cbcb3e90a2e9342f86b3b78c4408" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "59a8a6ae5e9d3eae99d08ab655d12fd51d5d17f3" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }
|
||||||
|
}
|
||||||
21
.chezmoitemplates/nvim/lua/config/keymaps.lua
Normal file
21
.chezmoitemplates/nvim/lua/config/keymaps.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
-- Aussehen
|
||||||
|
vim.opt.relativenumber = true -- Zeigt an der Seite die relative Zeilennummer an
|
||||||
|
vim.opt.termguicolors = true -- Schaltet 24-bit Farben an
|
||||||
|
vim.opt.scrolloff = 8 -- Verlangsamt den Scrolldown acht Zeilen vor Dateiende
|
||||||
|
-- Indentation und Zeilenumbruch
|
||||||
|
vim.opt.smartindent = true -- Automatisch Indentations setzen
|
||||||
|
vim.opt.wrap = false -- Schaltet Zeilenumbruch ab
|
||||||
|
vim.opt.clipboard:append("unnamedplus") -- Text in eine andere Anwendung kopieren
|
||||||
|
-- Tastenbelegungen (Leader-Key ist in lazy.lua angegeben)
|
||||||
|
vim.keymap.set("n", "<leader>pf", vim.cmd.Ex) -- Öffnet File-Explorer
|
||||||
|
|
||||||
|
-- Nvim-Tree
|
||||||
|
vim.keymap.set("n","<leader>s",":NvimTreeToggle<CR>", { noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n","<leader>d",":NvimTreeFocus<CR>", { noremap = true, silent = true })
|
||||||
|
vim.keymap.set("n","<leader>c",":NvimTreeClose<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Nvim-Telescope
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||||
|
vim.keymap.set('n', '<leader>fd', builtin.buffers, {})
|
||||||
35
.chezmoitemplates/nvim/lua/config/lazy.lua
Normal file
35
.chezmoitemplates/nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
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 = { "habamax" } },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
||||||
9
.chezmoitemplates/nvim/lua/plugins/catppuccin.lua
Normal file
9
.chezmoitemplates/nvim/lua/plugins/catppuccin.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
"catppuccin/nvim",
|
||||||
|
lazy = false,
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.cmd('colorscheme catppuccin-latte')
|
||||||
|
end
|
||||||
|
}
|
||||||
26
.chezmoitemplates/nvim/lua/plugins/dashboard-nvim.lua
Normal file
26
.chezmoitemplates/nvim/lua/plugins/dashboard-nvim.lua
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
return {
|
||||||
|
'nvimdev/dashboard-nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
config = function()
|
||||||
|
require('dashboard').setup {
|
||||||
|
theme = 'hyper',
|
||||||
|
config = {
|
||||||
|
week_header = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
shortcut = {
|
||||||
|
{ desc = ' Update', group = '@property', action = 'Lazy update', key = 'u' },
|
||||||
|
{
|
||||||
|
icon = ' ',
|
||||||
|
icon_hl = '@variable',
|
||||||
|
desc = 'Files',
|
||||||
|
group = 'Label',
|
||||||
|
action = 'Telescope find_files',
|
||||||
|
key = 'f',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
dependencies = { {'nvim-tree/nvim-web-devicons'} }
|
||||||
|
}
|
||||||
39
.chezmoitemplates/nvim/lua/plugins/mason.lua
Normal file
39
.chezmoitemplates/nvim/lua/plugins/mason.lua
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
-- Standardkonfiguration mit Icons setzen
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
config = function()
|
||||||
|
require("mason").setup {
|
||||||
|
ui = {
|
||||||
|
icons = {
|
||||||
|
package_installed = "✓",
|
||||||
|
package_pending = "➜",
|
||||||
|
package_uninstalled = "✗"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
config = function()
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
-- Installation der LSPs für Lua, C und Python
|
||||||
|
ensure_installed = { "lua_ls", "clangd", "pylsp", "jdtls"},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
config = function()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
lspconfig.lua_ls.setup({})
|
||||||
|
lspconfig.clangd.setup({})
|
||||||
|
lspconfig.jdtls.setup({})
|
||||||
|
-- Keybinds
|
||||||
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) -- Dokumentation hervorufen
|
||||||
|
vim.keymap.set({'n','v'}, '<leader>ka', vim.lsp.buf.code_action, {}) -- Code Action aufrufen
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
5
.chezmoitemplates/nvim/lua/plugins/nvim-tree.lua
Normal file
5
.chezmoitemplates/nvim/lua/plugins/nvim-tree.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
lazy = false,
|
||||||
|
config = {}
|
||||||
|
}
|
||||||
24
.chezmoitemplates/nvim/lua/plugins/telescope.lua
Normal file
24
.chezmoitemplates/nvim/lua/plugins/telescope.lua
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- Telescope konfigurieren
|
||||||
|
require('telescope').setup{
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
-- Mit j und k die Suche navigieren
|
||||||
|
["<c-h>"] = "which_key",
|
||||||
|
["<c-j>"] = "move_selection_next",
|
||||||
|
["<c-k>"] = "move_selection_previous"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
-- Weitere Addons für Telescope im README finden
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Telescope installieren
|
||||||
|
return {
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.8',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
}
|
||||||
3
.chezmoitemplates/nvim/lua/plugins/web-devicons.lua
Normal file
3
.chezmoitemplates/nvim/lua/plugins/web-devicons.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
'nvim-tree/nvim-web-devicons'
|
||||||
|
}
|
||||||
3
.chezmoitemplates/nvim/lua/plugins/whichkey.lua
Normal file
3
.chezmoitemplates/nvim/lua/plugins/whichkey.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"folke/which-key.nvim"
|
||||||
|
}
|
||||||
1
AppData/Local/nvim/init.lua.tmpl
Normal file
1
AppData/Local/nvim/init.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/init.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/config/keymaps.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/config/keymaps.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/config/keymaps.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/config/lazy.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/config/lazy.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/config/lazy.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/catppuccin.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/catppuccin.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/catppuccin.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/dashboard-nvim.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/dashboard-nvim.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/dashboard-nvim.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/mason.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/mason.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/mason.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/nvim-tree.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/nvim-tree.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/nvim-tree.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/telescope.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/telescope.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/telescope.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/web-devicons.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/web-devicons.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/web-devicons.lua" . }}
|
||||||
1
AppData/Local/nvim/lua/plugins/whichkey.lua.tmpl
Normal file
1
AppData/Local/nvim/lua/plugins/whichkey.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/whichkey.lua" . }}
|
||||||
1
private_dot_config/nvim/init.lua.tmpl
Normal file
1
private_dot_config/nvim/init.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/init.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/config/keymaps.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/config/keymaps.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/config/keymaps.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/config/lazy.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/config/lazy.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/config/lazy.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/plugins/catppuccin.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/plugins/catppuccin.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/catppuccin.lua" . }}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/dashboard-nvim.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/plugins/mason.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/plugins/mason.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/mason.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/plugins/nvim-tree.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/plugins/nvim-tree.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/nvim-tree.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/plugins/telescope.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/plugins/telescope.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/telescope.lua" . }}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/web-devicons.lua" . }}
|
||||||
1
private_dot_config/nvim/lua/plugins/whichkey.lua.tmpl
Normal file
1
private_dot_config/nvim/lua/plugins/whichkey.lua.tmpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ template "nvim/lua/plugins/whichkey.lua" . }}
|
||||||
Loading…
Reference in New Issue
Block a user