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 -- prefix for parameter hints
-- default: "<-" -- default: "<-"
parameter_hints_prefix = "<-", parameter_hints_prefix = O.lang.rust.rust_tools.parameter_hints_prefix,
-- prefix for all the other hints (type, chaining) -- prefix for all the other hints (type, chaining)
-- default: "=>" -- 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 -- whether to align to the lenght of the longest line in the file
max_len_align = false, max_len_align = false,

View file

@ -101,68 +101,7 @@ O = {
}, },
lang = { lang = {
python = { cmake = {},
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",
},
},
clang = { clang = {
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
@ -172,32 +111,37 @@ O = {
cross_file_rename = true, cross_file_rename = true,
header_insertion = "never", header_insertion = "never",
}, },
ruby = { css = {
diagnostics = { virtual_text = true,
virtualtext = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
filetypes = { "rb", "erb", "rakefile", "ruby" },
}, },
go = {}, dart = {
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
},
docker = {},
efm = {},
elm = {},
emmet = { active = true },
elixir = {}, elixir = {},
vim = {}, graphql = {},
yaml = {}, go = {},
terraform = {}, html = {},
rust = { java = {},
rust_tools = { json = {
active = false, diagnostics = {
}, virtual_text = { spacing = 0, prefix = "" },
linter = "", signs = true,
underline = true,
},
},
kotlin = {},
latex = {},
lua = {
diagnostics = { diagnostics = {
virtual_text = { spacing = 0, prefix = "" }, virtual_text = { spacing = 0, prefix = "" },
signs = true, signs = true,
underline = true, underline = true,
}, },
}, },
svelte = {},
php = { php = {
format = { format = {
format = { format = {
@ -214,19 +158,76 @@ O = {
}, },
filetypes = { "php", "phtml" }, filetypes = { "php", "phtml" },
}, },
latex = {}, python = {
kotlin = {}, linter = "",
html = {}, isort = false,
elm = {}, diagnostics = {
emmet = { active = true }, virtual_text = { spacing = 0, prefix = "" },
graphql = {}, signs = true,
efm = {}, underline = true,
docker = {}, },
cmake = {}, analysis = {
java = {}, type_checking = "basic",
css = { auto_search_paths = true,
virtual_text = 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 = { dashboard = {