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 ]; 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 = '' 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",