This commit is contained in:
Ray Elliott 2022-09-20 18:46:49 +01:00
commit 6bd40aeeeb
7 changed files with 93 additions and 90 deletions

View file

@ -180,12 +180,8 @@ require('rust-tools').setup({
settings = {["rust-analyzer"] = {checkOnSave = {command = "clippy"}}}
}
})
-- set inlay hints
require('rust-tools.inlay_hints').set_inlay_hints()
-- disable inlay hints
require('rust-tools.inlay_hints').disable_inlay_hints()
-- toggle inlay hints
require('rust-tools.inlay_hints').toggle_inlay_hints()
-- inlay hints
require('rust-tools').inlay_hints.enable()
------
-- null-ls
@ -214,6 +210,17 @@ local sources = {
root .. "/node_modules/@wordpress/scripts/config/.eslintignore"
}
}), --
null_ls.builtins.diagnostics.eslint,
-- null_ls.builtins.diagnostics.eslint.with({
-- condition = function(utils)
-- local has_file1 = utils.root_has_file({".eslintrc.js"})
-- local has_file2 = utils.root_has_file({"gatsby-config.js"})
-- print("condition")
-- print(has_file1)
-- print(has_file2)
-- return has_file1 and has_file2
-- end
-- }), --
null_ls.builtins.diagnostics.phpcs.with({
condition = function(utils)
return not utils.root_has_file({"vendor/bin/phpcs"})

View file

@ -1,16 +1,14 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = { "c" }, -- List of parsers to ignore installing
highlight = {
enable = true, -- false will disable the whole extension
disable = { "c", "rust" }, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true
}
-- ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = {"c"}, -- List of parsers to ignore installing
highlight = {
enable = true, -- false will disable the whole extension
disable = {"c", "rust"}, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false
},
indent = {enable = true}
}