Merge branch 'main' of codeberg.org:dnscio/nix-config

This commit is contained in:
Dennis Schoepf 2025-09-15 21:36:45 +02:00
commit b0431f8dff
3 changed files with 5 additions and 34 deletions

View file

@ -56,6 +56,7 @@
fnm
imagemagick
circumflex
gh
# rsync
];

View file

@ -138,6 +138,9 @@
kill_tunnels = ''
ps -o pid,command | grep "^[0-9]\{4,5\} ssh -NL" | awk '{print $1}' | xargs kill -9
'';
pr_comments = ''
gh api repos/digital-h-gmbh/ride/pulls/$argv/comments | jq -r '.[] | "- [ ] Fix \nnvim +\(.line) \(.path)\n\"\(.body)\"\n\n"' >./pr-comments.md && nvim ./pr-comments.md
'';
};
interactiveShellInit = ''

View file

@ -45,40 +45,7 @@ return {
}, nil, bufnr)
end, {})
end,
root_dir = function(bufnr, on_dir)
-- The project root is where the LSP can be started from
-- As stated in the documentation above, this LSP supports monorepos and simple projects.
-- We select then from the project root, which is identified by the presence of a package
-- manager lock file.
local root_markers = { "package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock", "deno.lock" }
-- Give the root markers equal priority by wrapping them in a table
root_markers = vim.fn.has("nvim-0.11.3") == 1 and { root_markers } or root_markers
local project_root = vim.fs.root(bufnr, root_markers)
if not project_root then
return
end
-- We know that the buffer is using ESLint if it has a config file
-- in its directory tree.
--
-- Eslint used to support package.json files as config files, but it doesn't anymore.
-- We keep this for backward compatibility.
local filename = vim.api.nvim_buf_get_name(bufnr)
local eslint_config_files_with_package_json =
utils.insert_package_json(eslint_config_files, "eslintConfig", filename)
local is_buffer_using_eslint = vim.fs.find(eslint_config_files_with_package_json, {
path = filename,
type = "file",
limit = 1,
upward = true,
stop = vim.fs.dirname(project_root),
})[1]
if not is_buffer_using_eslint then
return
end
on_dir(project_root)
end,
root_markers = eslint_config_files,
-- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation.
settings = {
validate = "on",