{"id":2440922,"url":"https://github.com/askfiy/lsp_extra_dim","last_synced_at":"2025-07-23T00:32:08.123Z","repository":{"id":176235728,"uuid":"614471728","full_name":"askfiy/lsp_extra_dim","owner":"askfiy","description":"Dim unused parameters from neovim..","archived":false,"fork":false,"pushed_at":"2023-12-07T02:31:00.000Z","size":206,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-10T15:40:32.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/askfiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-15T16:45:09.000Z","updated_at":"2024-04-15T01:24:06.000Z","dependencies_parsed_at":"2023-11-27T10:40:43.228Z","dependency_job_id":"8007f4c8-8731-4a92-94eb-0cddf9a5b3d1","html_url":"https://github.com/askfiy/lsp_extra_dim","commit_stats":null,"previous_names":["askfiy/lsp_extra_dim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askfiy%2Flsp_extra_dim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askfiy%2Flsp_extra_dim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askfiy%2Flsp_extra_dim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askfiy%2Flsp_extra_dim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/askfiy","download_url":"https://codeload.github.com/askfiy/lsp_extra_dim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227212075,"owners_count":17748810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-24T13:57:50.528Z","updated_at":"2024-11-29T20:31:04.672Z","avatar_url":"https://github.com/askfiy.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# README\n\n## INTRODUCTION\n\n`lsp_extra_dim` is a `neovim` plugin written 100% in `lua`. Aims to provide dimmed styles for some unused `variables`, `functions`, `parameters` and disable `Lsp Diagnostic Style`\n\n![example](./screen/example.png)\n\nHe is inspired by [neodim](https://github.com/zbirenbaum/neodim) and [dim](https://github.com/0oAstro/dim.lua). But with some cool features.\n\n## USE\n\nFrom lazy.nvim:\n\n```lua\n{\n    \"askfiy/lsp_extra_dim\",\n    event = { \"LspAttach\" },\n    config = function ()\n        require(\"lsp_extra_dim\").setup()\n    end\n}\n```\n\n## CONFIG\n\nThe configurations that can be passed in setup are:\n\n```lua\nreturn {\n    hooks = {\n        -- see: README/CONCEPT\n        -- after the default filter function runs, the following hook function will be executed\n        lsp_filter = function(diagnostics)\n            -- get all used diagnostics\n            return diagnostics\n        end,\n    },\n\n    -- disable diagnostic styling while dimming the colors?\n    --------------------------------------\n    -- {}    : do not disable any diagnostic styles\n    -- \"all\" : disable all diagnostic styles\n    -- { \"parameter\", \"function\", \"keyword.function\"} : only disable diagnostic styles for specific captures\n    --------------------------------------\n    -- see `https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md`\n    disable_diagnostic_style = \"all\",\n    -- customize different files for different file types disable_diagnostic_style\n    filetype_options = {\n        -- python = {\n        --     disable_diagnostic_style = {\n        --         \"parameter\",\n        --         \"type\"\n        --     }\n        -- }\n    },\n}\n```\n\n## CONCEPT\n\nThis is a plugin to disable unused extra style in LSP The implementation method is very simple:\n\n- 1. Customize the vim.diagnostic.handlers[signs\u0026#124;virtual_text].show method\n- 2. Override the show method of handlers other than underline, Filtering out unused resources\n- 3. Underline's show method will still dim them, but other handler's show methods will disable hints such as dummy text\n\nSo, he has 1 filtering steps:\n\n- 1. Screening on `lsp diagnostic` level\n\nFiltering at `lsp diagnostic` level will remove all diagnostics containing `unused` (but some diagnostics that qualify in `disable_diagnostic_style` will be kept)\n\nIn the configuration of `setup`, `lsp_filter` are the hook functions defined after the default filter function runs.\n\n## CASE\n\nDisable all diagnostic styles:\n\n![all](./screen/all.png)\n\n\u003cdetails\u003e\n  \u003csummary\u003e--snippet--\u003c/summary\u003e\n\n```lua\nconfig = function ()\n    require(\"lsp_extra_dim\").setup({\n        disable_diagnostic_style = \"all\"\n    })\n```\n\n\u003c/details\u003e\n\nDo not disable any diagnostic styles:\n\n![empty](./screen/empty.png)\n\n\u003cdetails\u003e\n  \u003csummary\u003e--snippet--\u003c/summary\u003e\n\n```lua\nconfig = function ()\n    require(\"lsp_extra_dim\").setup({\n        disable_diagnostic_style = {}\n    })\n```\n\n\u003c/details\u003e\n\nDisable diagnostic style for function arguments only:\n\n![params](./screen/params.png)\n\n\u003cdetails\u003e\n  \u003csummary\u003e--snippet--\u003c/summary\u003e\n\n```lua\n\nconfig = function ()\n    require(\"lsp_extra_dim\").setup({\n        disable_diagnostic_style = {\n            \"parameter\"\n        }\n    })\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskfiy%2Flsp_extra_dim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faskfiy%2Flsp_extra_dim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskfiy%2Flsp_extra_dim/lists"}