User config option to change Rust inline hint/param prefixes (#774)

* User configurable Rust inline hint prefixes

* Ordered the language list

* Rust param hints and ordered lang list
This commit is contained in:
Henrik Nilsson 2021-07-08 18:58:22 +02:00 committed by GitHub
parent 53fed9d655
commit d9fc6ec826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 95 additions and 94 deletions

View file

@ -32,11 +32,11 @@ if O.lang.rust.rust_tools.active then
-- prefix for parameter hints
-- default: "<-"
parameter_hints_prefix = "<-",
parameter_hints_prefix = O.lang.rust.rust_tools.parameter_hints_prefix,
-- prefix for all the other hints (type, chaining)
-- default: "=>"
other_hints_prefix = "=>",
other_hints_prefix = O.lang.rust.rust_tools.other_hints_prefix,
-- whether to align to the lenght of the longest line in the file
max_len_align = false,

View file

@ -101,68 +101,7 @@ O = {
},
lang = {
python = {
linter = "",
isort = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
analysis = {
type_checking = "basic",
auto_search_paths = true,
use_library_code_types = true,
},
},
dart = {
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
},
lua = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
sh = {
-- @usage can be 'shellcheck'
linter = "",
-- @usage can be 'shfmt'
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
tsserver = {
-- @usage can be 'eslint'
linter = "",
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
json = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
tailwindcss = {
active = false,
filetypes = {
"html",
"css",
"scss",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
},
},
cmake = {},
clang = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
@ -172,32 +111,37 @@ O = {
cross_file_rename = true,
header_insertion = "never",
},
ruby = {
diagnostics = {
virtualtext = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
filetypes = { "rb", "erb", "rakefile", "ruby" },
css = {
virtual_text = true,
},
go = {},
dart = {
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
},
docker = {},
efm = {},
elm = {},
emmet = { active = true },
elixir = {},
vim = {},
yaml = {},
terraform = {},
rust = {
rust_tools = {
active = false,
},
linter = "",
graphql = {},
go = {},
html = {},
java = {},
json = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
kotlin = {},
latex = {},
lua = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
svelte = {},
php = {
format = {
format = {
@ -214,19 +158,76 @@ O = {
},
filetypes = { "php", "phtml" },
},
latex = {},
kotlin = {},
html = {},
elm = {},
emmet = { active = true },
graphql = {},
efm = {},
docker = {},
cmake = {},
java = {},
css = {
virtual_text = true,
python = {
linter = "",
isort = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
analysis = {
type_checking = "basic",
auto_search_paths = true,
use_library_code_types = true,
},
},
ruby = {
diagnostics = {
virtualtext = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
filetypes = { "rb", "erb", "rakefile", "ruby" },
},
rust = {
rust_tools = {
active = false,
parameter_hints_prefix = "<-",
other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
},
linter = "",
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
sh = {
-- @usage can be 'shellcheck'
linter = "",
-- @usage can be 'shfmt'
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
svelte = {},
tailwindcss = {
active = false,
filetypes = {
"html",
"css",
"scss",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
},
},
terraform = {},
tsserver = {
-- @usage can be 'eslint'
linter = "",
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
vim = {},
yaml = {},
},
dashboard = {