From 0634216a1d1ef1f7c78c2430b511c012ef892b7d Mon Sep 17 00:00:00 2001 From: mpuchstein Date: Wed, 2 Apr 2025 20:26:07 +0200 Subject: [PATCH] some nvim updates --- .config/nvim/init.lua | 7 +++++ .config/nvim/lazy-lock.json | 19 ++++++++++++++ .config/nvim/lua/config/lazy.lua | 35 +++++++++++++++++++++++++ .config/nvim/lua/config/options.lua | 21 +++++++++++++++ .config/nvim/lua/plugins/completion.lua | 11 ++++++++ .config/nvim/lua/plugins/deus.lua | 4 +++ .config/nvim/lua/plugins/lspconfig.lua | 9 +++++++ .config/nvim/lua/plugins/plenary.lua | 2 ++ .config/nvim/lua/plugins/telescope.lua | 5 ++++ .config/nvim/lua/plugins/tree.lua | 5 ++++ .config/nvim/lua/plugins/treesitter.lua | 6 +++++ .config/nvim/lua/plugins/which-key.lua | 4 +++ .config/uwsm/env | 2 +- 13 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/config/lazy.lua create mode 100644 .config/nvim/lua/config/options.lua create mode 100644 .config/nvim/lua/plugins/completion.lua create mode 100644 .config/nvim/lua/plugins/deus.lua create mode 100644 .config/nvim/lua/plugins/lspconfig.lua create mode 100644 .config/nvim/lua/plugins/plenary.lua create mode 100644 .config/nvim/lua/plugins/telescope.lua create mode 100644 .config/nvim/lua/plugins/tree.lua create mode 100644 .config/nvim/lua/plugins/treesitter.lua create mode 100644 .config/nvim/lua/plugins/which-key.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..e74c2e7 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,7 @@ +-- Initialize core settings first +require("config.options") + +-- Load plugin manager +require("config.lazy") + +-- Configure UI components last diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..ec6feba --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,19 @@ +{ + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, + "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" }, + "nvim-deus": { "branch": "master", "commit": "b930172dc75d00084233abc6f19f0708c298d8be" }, + "nvim-lspconfig": { "branch": "master", "commit": "40f120c10ea4b87311175539a183c3b75eab95a3" }, + "nvim-tree.lua": { "branch": "master", "commit": "44d9b58f11d5a426c297aafd0be1c9d45617a849" }, + "nvim-treesitter": { "branch": "master", "commit": "30654ee72a69e7c76a54b66d748dae088429e863" }, + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..ae2b6bf --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua @@ -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 = { "deus" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..af1b2fb --- /dev/null +++ b/.config/nvim/lua/config/options.lua @@ -0,0 +1,21 @@ + +-- Basic settings +vim.o.number = true +vim.o.relativenumber = true +vim.o.tabstop = 2 +vim.o.shiftwidth = 2 +vim.o.expandtab = true +vim.o.smartindent = true +vim.o.wrap = false +vim.o.cursorline = true +vim.o.termguicolors = true +vim.o.ruler = true +vim.o.visualbell = true +vim.o.modelines = 0 +vim.o.colorcolumn = '+1,100,120' +vim.o.hidden = true +vim.o.showmode = true + +-- Syntax highlighting and filetype plugins +vim.cmd('syntax enable') +vim.cmd('filetype plugin indent on') diff --git a/.config/nvim/lua/plugins/completion.lua b/.config/nvim/lua/plugins/completion.lua new file mode 100644 index 0000000..218b99a --- /dev/null +++ b/.config/nvim/lua/plugins/completion.lua @@ -0,0 +1,11 @@ +-- Autocompletion system +return { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", -- LSP source for nvim-cmp + "hrsh7th/cmp-buffer", -- Buffer source + "hrsh7th/cmp-path", -- Path source + "L3MON4D3/LuaSnip", -- Snippet engine + "saadparwaiz1/cmp_luasnip", -- Snippet source + }, +} diff --git a/.config/nvim/lua/plugins/deus.lua b/.config/nvim/lua/plugins/deus.lua new file mode 100644 index 0000000..b7a892e --- /dev/null +++ b/.config/nvim/lua/plugins/deus.lua @@ -0,0 +1,4 @@ +-- Color scheme +return { + "theniceboy/nvim-deus" +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..92288da --- /dev/null +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -0,0 +1,9 @@ +-- Language Server Protocol support +return { + "neovim/nvim-lspconfig", -- Base LSP configurations + dependencies = { + -- Server installation manager + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + }, + } diff --git a/.config/nvim/lua/plugins/plenary.lua b/.config/nvim/lua/plugins/plenary.lua new file mode 100644 index 0000000..8292548 --- /dev/null +++ b/.config/nvim/lua/plugins/plenary.lua @@ -0,0 +1,2 @@ +-- Utility functions +return {"nvim-lua/plenary.nvim"} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..f8dc194 --- /dev/null +++ b/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,5 @@ +-- Fuzzy finder +return { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-lua/plenary.nvim" } +} diff --git a/.config/nvim/lua/plugins/tree.lua b/.config/nvim/lua/plugins/tree.lua new file mode 100644 index 0000000..2457758 --- /dev/null +++ b/.config/nvim/lua/plugins/tree.lua @@ -0,0 +1,5 @@ +-- File explorer +return { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, +} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..a1e8e05 --- /dev/null +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,6 @@ +-- Treesitter for syntax highlighting (load early) +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + priority = 100, -- Load early + } diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua new file mode 100644 index 0000000..a946f2e --- /dev/null +++ b/.config/nvim/lua/plugins/which-key.lua @@ -0,0 +1,4 @@ +-- Key binding helper +return { + "folke/which-key.nvim", +} diff --git a/.config/uwsm/env b/.config/uwsm/env index 379a66d..d2a2ceb 100644 --- a/.config/uwsm/env +++ b/.config/uwsm/env @@ -18,4 +18,4 @@ export ELECTRON_OZONE_PLATFORM_HINT=wayland export MOZ_ENABLE_WAYLAND=1 -export GRIMBLAST_EDITOR='swappy -f' +export GRIMBLAST_EDITOR='satty -f'