From 0062bf43e3e4f3736b5f607f45184c61cf5bbcf7 Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 15 Sep 2025 09:22:59 +0200 Subject: [PATCH 1/3] removes root_dir in favor of root_markers --- modules/nvim/config/lsp/eslint.lua | 35 +----------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/modules/nvim/config/lsp/eslint.lua b/modules/nvim/config/lsp/eslint.lua index 53aa960..6808cd4 100644 --- a/modules/nvim/config/lsp/eslint.lua +++ b/modules/nvim/config/lsp/eslint.lua @@ -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", From 39625954395bee457fbf0da809cae5889691b35d Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 15 Sep 2025 12:11:08 +0200 Subject: [PATCH 2/3] adds github cli on dnsc-work --- hosts/dnsc-work/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/dnsc-work/default.nix b/hosts/dnsc-work/default.nix index c913082..fe56bd2 100644 --- a/hosts/dnsc-work/default.nix +++ b/hosts/dnsc-work/default.nix @@ -56,6 +56,7 @@ fnm imagemagick circumflex + gh # rsync ]; From 6d1bb749a712a6fddc2078527c53d0b835b98746 Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 15 Sep 2025 12:43:20 +0200 Subject: [PATCH 3/3] adds helper for pr comments --- modules/fish/work.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/fish/work.nix b/modules/fish/work.nix index 0eae266..ae25d84 100644 --- a/modules/fish/work.nix +++ b/modules/fish/work.nix @@ -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 = ''