multiple fixes by claude

This commit is contained in:
2026-03-02 20:05:52 +01:00
parent f8df1ea641
commit 345b19b603
12 changed files with 79 additions and 68 deletions
+1
View File
@@ -0,0 +1 @@
lazy-lock.json
+70
View File
@@ -0,0 +1,70 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Overview
Personal Neovim configuration using [lazy.nvim](https://github.com/folke/lazy.nvim) as the plugin manager. All Lua code lives under the `holger` namespace in `lua/holger/`.
## Architecture
**Entry point:** `init.lua` loads two modules:
- `holger.core` — Neovim options and keymaps (`lua/holger/core/`)
- `holger.lazy` — bootstraps lazy.nvim and loads all plugins
**Plugin loading:** `lua/holger/lazy.lua` calls `require("lazy").setup()` with two import paths:
- `holger.plugins` — all files in `lua/holger/plugins/` (each returns a lazy.nvim spec table)
- `holger.plugins.lsp` — files in `lua/holger/plugins/lsp/`
**Adding a plugin:** Create a new file in `lua/holger/plugins/` that returns a lazy.nvim spec table. It will be auto-imported.
## Key Configuration
- **Leader key:** `<Space>`
- **Colorscheme:** catppuccin
- **Indentation:** 2 spaces, expandtab
## LSP Stack
- `mason.nvim` — installs LSP servers and tools
- `mason-lspconfig.nvim` — bridges Mason with nvim-lspconfig; auto-installs: `ts_ls`, `html`, `cssls`, `tailwindcss`, `lua_ls`, `pyright`, `eslint`
- `mason-tool-installer.nvim` — installs formatters/linters: `prettier`, `stylua`, `isort`, `black`, `pylint`, `eslint_d`
- `cmp-nvim-lsp` (`lua/holger/plugins/lsp/lspconfig.lua`) — sets up capabilities via `vim.lsp.config("*", ...)` (native Neovim LSP API)
## Formatting & Linting
- **conform.nvim** — formats on save; `<leader>mp` to format manually
- JS/TS/CSS/HTML/JSON/YAML/Markdown/GraphQL → prettier
- Lua → stylua
- Python → isort + black
- **nvim-lint** — lints on BufEnter/BufWritePost/InsertLeave; `<leader>l` to trigger manually
- Python → pylint
## Key Keymaps
| Key | Action |
|-----|--------|
| `jk` (insert) | Exit insert mode |
| `<leader>ee` | Toggle nvim-tree file explorer |
| `<leader>ef` | Toggle explorer on current file |
| `<leader>ff` | Telescope find files |
| `<leader>fs` | Telescope live grep |
| `<leader>fr` | Telescope recent files |
| `<leader>fc` | Grep string under cursor |
| `s` / `S` | Flash jump / Flash treesitter jump |
| `<leader>mp` | Format file (conform) |
| `<leader>l` | Trigger linting |
| `<leader>sv/sh` | Split window vertical/horizontal |
| `<leader>nh` | Clear search highlights |
## Notable Plugins
- **telescope.nvim** — fuzzy finder with fzf-native extension
- **nvim-treesitter** — syntax highlighting and incremental selection (`<C-space>`)
- **nvim-cmp** — completion engine with LuaSnip snippets and LSP/buffer/path sources
- **flash.nvim** — enhanced motion with jump labels; integrated into `/` search
- **neorg** — note-taking, workspace at `~/notes`
- **auto-session** — automatic session save/restore
- **which-key** — displays keybinding hints
- **fugitive** — Git integration
- **trouble.nvim** — diagnostics list
+1
View File
@@ -1,2 +1,3 @@
require("holger.core") require("holger.core")
require("holger.lazy") require("holger.lazy")
require("holger.lsp")
+2
View File
@@ -34,3 +34,5 @@ opt.clipboard:append("unnamedplus") -- use system clipboard as default register
-- split windows -- split windows
opt.splitright = true -- split vertical window to the right opt.splitright = true -- split vertical window to the right
opt.splitbelow = true -- split horiziontal window to the bottom opt.splitbelow = true -- split horiziontal window to the bottom
opt.timeoutlen = 500 -- time to wait for a mapped sequence to complete (ms)
+1 -1
View File
@@ -1,5 +1,5 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.uv.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "git",
"clone", "clone",
+2 -2
View File
@@ -4,8 +4,8 @@ return {
local auto_session = require("auto-session") local auto_session = require("auto-session")
auto_session.setup({ auto_session.setup({
auto_restore_enabled = false, auto_restore = false,
auto_session_suppress_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" }, suppressed_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" },
}) })
local keymap = vim.keymap local keymap = vim.keymap
-19
View File
@@ -1,19 +0,0 @@
return {
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
config = function()
-- import comment plugin safely
local comment = require("Comment")
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
-- enable comment
comment.setup({
-- for commenting tsx, jsx, svelte, html files
pre_hook = ts_context_commentstring.create_pre_hook(),
})
end,
}
-39
View File
@@ -10,47 +10,8 @@ return {
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
local function file_in_cwd(file_name)
return vim.fs.find(file_name, {
upward = true,
stop = vim.loop.cwd():match("(.+)/"),
path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)),
type = "file",
})[1]
end
local function remove_linter(linters, linter_name)
for k, v in pairs(linters) do
if v == linter_name then
linters[k] = nil
break
end
end
end
local function linter_in_linters(linters, linter_name)
for k, v in pairs(linters) do
if v == linter_name then
return true
end
end
return false
end
local function remove_linter_if_missing_config_file(linters, linter_name, config_file_name)
if linter_in_linters(linters, linter_name) and not file_in_cwd(config_file_name) then
remove_linter(linters, linter_name)
end
end
local function try_linting() local function try_linting()
local linters = lint.linters_by_ft[vim.bo.filetype] local linters = lint.linters_by_ft[vim.bo.filetype]
-- if linters then
-- -- remove_linter_if_missing_config_file(linters, "eslint_d", ".eslintrc.cjs")
-- remove_linter_if_missing_config_file(linters, "eslint_d", "eslint.config.js")
-- end
lint.try_lint(linters) lint.try_lint(linters)
end end
+1
View File
@@ -14,6 +14,7 @@ return {
fg = "#c3ccdc", fg = "#c3ccdc",
bg = "#112638", bg = "#112638",
inactive_bg = "#2c3043", inactive_bg = "#2c3043",
semilightgray = "#6c7a9c",
} }
local my_lualine_theme = { local my_lualine_theme = {
+1 -1
View File
@@ -1,6 +1,6 @@
return { return {
"nvim-neorg/neorg", "nvim-neorg/neorg",
lazy = false, -- load immediately ft = "norg",
version = "*", -- latest stable release version = "*", -- latest stable release
dependencies = { "nvim-lua/plenary.nvim" }, -- Neorg requires plenary dependencies = { "nvim-lua/plenary.nvim" }, -- Neorg requires plenary
config = function() config = function()
-2
View File
@@ -7,8 +7,6 @@ return {
substitute.setup() substitute.setup()
-- set keymaps -- set keymaps
local keymap = vim.keymap -- for conciseness
vim.keymap.set("n", "<leader>r", substitute.operator, { desc = "Substitute with motion" }) vim.keymap.set("n", "<leader>r", substitute.operator, { desc = "Substitute with motion" })
vim.keymap.set("n", "<leader>rr", substitute.line, { desc = "Substitute line" }) vim.keymap.set("n", "<leader>rr", substitute.line, { desc = "Substitute line" })
vim.keymap.set("n", "<leader>R", substitute.eol, { desc = "Substitute to end of line" }) vim.keymap.set("n", "<leader>R", substitute.eol, { desc = "Substitute to end of line" })
-4
View File
@@ -1,10 +1,6 @@
return { return {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy", event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 500
end,
opts = { opts = {
-- your configuration comes here -- your configuration comes here
-- or leave it empty to use the default settings -- or leave it empty to use the default settings