|
| 1 | +-- You don't need to set these options. |
| 2 | +require("colorful-menu").setup { |
| 3 | + ls = { |
| 4 | + lua_ls = { |
| 5 | + -- Maybe you want to dim arguments a bit. |
| 6 | + arguments_hl = "@comment", |
| 7 | + }, |
| 8 | + gopls = { |
| 9 | + -- By default, we render variable/function's type in the right most side, |
| 10 | + -- to make them not to crowd together with the original label. |
| 11 | + |
| 12 | + -- when true: |
| 13 | + -- foo *Foo |
| 14 | + -- ast "go/ast" |
| 15 | + |
| 16 | + -- when false: |
| 17 | + -- foo *Foo |
| 18 | + -- ast "go/ast" |
| 19 | + align_type_to_right = true, |
| 20 | + -- When true, label for field and variable will format like "foo: Foo" |
| 21 | + -- instead of go's original syntax "foo Foo". If align_type_to_right is |
| 22 | + -- true, this option has no effect. |
| 23 | + add_colon_before_type = false, |
| 24 | + -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 |
| 25 | + preserve_type_when_truncate = true, |
| 26 | + }, |
| 27 | + -- for lsp_config or typescript-tools |
| 28 | + ts_ls = { |
| 29 | + -- false means do not include any extra info, |
| 30 | + -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42 |
| 31 | + extra_info_hl = "@comment", |
| 32 | + }, |
| 33 | + vtsls = { |
| 34 | + -- false means do not include any extra info, |
| 35 | + -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42 |
| 36 | + extra_info_hl = "@comment", |
| 37 | + }, |
| 38 | + ["rust-analyzer"] = { |
| 39 | + -- Such as (as Iterator), (use std::io). |
| 40 | + extra_info_hl = "@comment", |
| 41 | + -- Similar to the same setting of gopls. |
| 42 | + align_type_to_right = true, |
| 43 | + -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 |
| 44 | + preserve_type_when_truncate = true, |
| 45 | + }, |
| 46 | + clangd = { |
| 47 | + -- Such as "From <stdio.h>". |
| 48 | + extra_info_hl = "@comment", |
| 49 | + -- Similar to the same setting of gopls. |
| 50 | + align_type_to_right = true, |
| 51 | + -- the hl group of leading dot of "•std::filesystem::permissions(..)" |
| 52 | + import_dot_hl = "@comment", |
| 53 | + -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 |
| 54 | + preserve_type_when_truncate = true, |
| 55 | + }, |
| 56 | + zls = { |
| 57 | + -- Similar to the same setting of gopls. |
| 58 | + align_type_to_right = true, |
| 59 | + }, |
| 60 | + roslyn = { |
| 61 | + extra_info_hl = "@comment", |
| 62 | + }, |
| 63 | + dartls = { |
| 64 | + extra_info_hl = "@comment", |
| 65 | + }, |
| 66 | + -- The same applies to pyright/pylance |
| 67 | + basedpyright = { |
| 68 | + -- It is usually import path such as "os" |
| 69 | + extra_info_hl = "@comment", |
| 70 | + }, |
| 71 | + pylsp = { |
| 72 | + extra_info_hl = "@comment", |
| 73 | + -- Dim the function argument area, which is the main |
| 74 | + -- difference with pyright. |
| 75 | + arguments_hl = "@comment", |
| 76 | + }, |
| 77 | + -- If true, try to highlight "not supported" languages. |
| 78 | + fallback = true, |
| 79 | + -- this will be applied to label description for unsupport languages |
| 80 | + fallback_extra_info_hl = "@comment", |
| 81 | + }, |
| 82 | + -- If the built-in logic fails to find a suitable highlight group for a label, |
| 83 | + -- this highlight is applied to the label. |
| 84 | + fallback_highlight = "@variable", |
| 85 | + -- If provided, the plugin truncates the final displayed text to |
| 86 | + -- this width (measured in display cells). Any highlights that extend |
| 87 | + -- beyond the truncation point are ignored. When set to a float |
| 88 | + -- between 0 and 1, it'll be treated as percentage of the width of |
| 89 | + -- the window: math.floor(max_width * vim.api.nvim_win_get_width(0)) |
| 90 | + -- Default 60. |
| 91 | + max_width = 60, |
| 92 | +} |
0 commit comments