update
This commit is contained in:
parent
92b654756e
commit
3bf55a67c3
|
@ -171,7 +171,6 @@ require'lspconfig'.taplo.setup {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- rust-tools
|
-- rust-tools
|
||||||
-- evaluating
|
|
||||||
require('rust-tools').setup({
|
require('rust-tools').setup({
|
||||||
server = {
|
server = {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
@ -193,41 +192,13 @@ require('rust-tools.inlay_hints').toggle_inlay_hints()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
local sources = {
|
local sources = {
|
||||||
null_ls.builtins.formatting.prettierd, --
|
null_ls.builtins.formatting.prettierd,
|
||||||
-- phpcs - standards wordpress
|
|
||||||
-- in project directory must
|
|
||||||
-- composer require friendsofphp/php-cs-fixer
|
|
||||||
-- as in https://github.com/FriendsOfPHP/PHP-CS-Fixer
|
|
||||||
-- I think so anyway - not totally sure any more
|
|
||||||
null_ls.builtins.diagnostics.phpcs.with({
|
|
||||||
condition = function(utils)
|
|
||||||
return utils.root_has_file({"vendor/bin/phpcs"})
|
|
||||||
end,
|
|
||||||
command = "vendor/bin/phpcs",
|
|
||||||
args = {"--standard=WordPress", "--report=json", "-s", "-"}
|
|
||||||
}), --
|
|
||||||
-- phpcbf - standards wordpress
|
|
||||||
-- null_ls.builtins.formatting.phpcbf.with({
|
|
||||||
-- condition = function(utils)
|
|
||||||
-- return utils.root_has_file({"vendor/bin/phpcbf"})
|
|
||||||
-- end,
|
|
||||||
-- command = "vendor/bin/phpcbf",
|
|
||||||
-- args = {"--standard=WordPress", "-"}
|
|
||||||
-- }), --
|
|
||||||
-- phpcs
|
|
||||||
null_ls.builtins.diagnostics.phpcs.with({
|
null_ls.builtins.diagnostics.phpcs.with({
|
||||||
condition = function(utils)
|
condition = function(utils)
|
||||||
return not utils.root_has_file({"vendor/bin/phpcs"})
|
return not utils.root_has_file({"vendor/bin/phpcs"})
|
||||||
end,
|
end,
|
||||||
args = {"--standard=PSR12", "--report=json", "-s", "-"}
|
args = {"--standard=PSR12", "--report=json", "-s", "-"}
|
||||||
}), --
|
}), --
|
||||||
-- phpcbf
|
|
||||||
-- null_ls.builtins.formatting.phpcbf.with({
|
|
||||||
-- condition = function(utils)
|
|
||||||
-- return not utils.root_has_file({"vendor/bin/phpcbf"})
|
|
||||||
-- end,
|
|
||||||
-- args = {"--standard=PSR12", "--report=json", "-s", "-"}
|
|
||||||
-- }),
|
|
||||||
null_ls.builtins.formatting.black, -- black
|
null_ls.builtins.formatting.black, -- black
|
||||||
null_ls.builtins.diagnostics.shellcheck, -- shellcheck,
|
null_ls.builtins.diagnostics.shellcheck, -- shellcheck,
|
||||||
null_ls.builtins.diagnostics.flake8, -- flake8
|
null_ls.builtins.diagnostics.flake8, -- flake8
|
||||||
|
|
30
lua/init.lua
30
lua/init.lua
|
@ -1,5 +1,5 @@
|
||||||
vim.o.foldmethod='expr'
|
vim.o.foldmethod = 'expr'
|
||||||
vim.o.foldexpr='nvim_treesitter#foldexpr()'
|
vim.o.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
|
@ -8,32 +8,20 @@ vim.diagnostic.config({
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
float = {
|
float = {
|
||||||
source = "always", -- Or "if_many"
|
source = "always" -- Or "if_many"
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- -- automatically show diagnostics for line
|
local signs = {Error = "● ", Warn = "● ", Hint = "● ", Info = "● "}
|
||||||
-- vim.cmd [[
|
|
||||||
-- augroup diagnostic_on_hover
|
|
||||||
-- autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})
|
|
||||||
-- augroup END
|
|
||||||
-- ]]
|
|
||||||
|
|
||||||
local signs = { Error = "● ", Warn = "● ", Hint = "● ", Info = "● " }
|
|
||||||
for type, icon in pairs(signs) do
|
for type, icon in pairs(signs) do
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(hl, {text = icon, texthl = hl, numhl = hl})
|
||||||
end
|
end
|
||||||
|
|
||||||
local border = {
|
local border = {
|
||||||
{"┌", "FloatBorder"},
|
{"┌", "FloatBorder"}, {"─", "FloatBorder"}, {"┐", "FloatBorder"},
|
||||||
{"─", "FloatBorder"},
|
{"│", "FloatBorder"}, {"┘", "FloatBorder"}, {"─", "FloatBorder"},
|
||||||
{"┐", "FloatBorder"},
|
{"└", "FloatBorder"}, {"│", "FloatBorder"}
|
||||||
{"│", "FloatBorder"},
|
|
||||||
{"┘", "FloatBorder"},
|
|
||||||
{"─", "FloatBorder"},
|
|
||||||
{"└", "FloatBorder"},
|
|
||||||
{"│", "FloatBorder"},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
||||||
|
|
|
@ -259,3 +259,4 @@ booleans
|
||||||
pothos
|
pothos
|
||||||
monstera
|
monstera
|
||||||
Heartleaf
|
Heartleaf
|
||||||
|
i32
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue