Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
7249dc0978 |
8 changed files with 44 additions and 55 deletions
|
@ -25,6 +25,7 @@ command -v phpcs &>/dev/null || composer global require "squizlabs/php_codesniff
|
|||
command -v phpstan &>/dev/null || composer global require "phpstan/phpstan=*" -n
|
||||
command -v php-cs-fixer &>/dev/null || composer global require "friendsofphp/php-cs-fixer=*" -n
|
||||
command -v twigcs &>/dev/null || composer global require "friendsoftwig/twigcs=*" -n
|
||||
command -v ludtwig &>/dev/null || cargo install ludtwig
|
||||
|
||||
# Rust
|
||||
command -v cargo-clippy &>/dev/null || rustup component add clippy
|
||||
|
|
|
@ -163,17 +163,17 @@ K.CODE = {
|
|||
},
|
||||
GOTO_DEFINITION = {
|
||||
mode = 'n',
|
||||
shortcut = '<Leader>cg',
|
||||
shortcut = '<Leader>cgd',
|
||||
description = 'Go to Definition',
|
||||
},
|
||||
PEEK_DEFINITION = {
|
||||
mode = 'n',
|
||||
shortcut = '<Leader>cp',
|
||||
shortcut = '<Leader>cpd',
|
||||
description = 'Peek Code Definition',
|
||||
},
|
||||
GOTO_REFERENCES = {
|
||||
mode = 'n',
|
||||
shortcut = '<Leader>cr',
|
||||
shortcut = '<Leader>cgr',
|
||||
description = 'Go to References',
|
||||
},
|
||||
ACTIONS = {
|
||||
|
@ -181,11 +181,6 @@ K.CODE = {
|
|||
shortcut = '<Leader>ca',
|
||||
description = 'Do Code Actions',
|
||||
},
|
||||
ERROR = {
|
||||
mode = 'n',
|
||||
shortcut = '<leader>ce',
|
||||
description = 'Show Code Errors',
|
||||
},
|
||||
FORMAT = {
|
||||
mode = 'n',
|
||||
shortcut = '<Leader>cf',
|
||||
|
@ -193,7 +188,7 @@ K.CODE = {
|
|||
},
|
||||
RENAME = {
|
||||
mode = 'n',
|
||||
shortcut = '<Leader>cn',
|
||||
shortcut = '<Leader>cr',
|
||||
description = 'Rename Variable',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -56,12 +56,6 @@ return {
|
|||
vim.lsp.buf.code_action,
|
||||
{ desc = K.CODE.ACTIONS.description }
|
||||
)
|
||||
vim.keymap.set(
|
||||
K.CODE.ERROR.mode,
|
||||
K.CODE.ERROR.shortcut,
|
||||
vim.diagnostic.open_float,
|
||||
{ desc = K.CODE.ERROR.description }
|
||||
)
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ return {
|
|||
'akinsho/toggleterm.nvim',
|
||||
config = function()
|
||||
local terminal = require('toggleterm')
|
||||
terminal.setup()
|
||||
terminal.setup({shell = '/usr/bin/zsh'})
|
||||
|
||||
vim.keymap.set(
|
||||
K.TOGGLE_TERMINAL.mode,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
return {
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
dependencies = {
|
||||
'MunifTanjim/nui.nvim',
|
||||
|
@ -23,15 +22,4 @@ return {
|
|||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
'rcarriga/nvim-notify',
|
||||
config = function()
|
||||
local notify = require('notify')
|
||||
notify.setup({
|
||||
render = 'wrapped-compact',
|
||||
timeout = 750,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -13,6 +13,21 @@ function M.setup()
|
|||
prefer_local = 'vendor/bin/php-cs-fixer',
|
||||
args = { 'fix', '--allow-risky=yes', '$FILENAME' },
|
||||
}),
|
||||
{
|
||||
name = 'ludtwig',
|
||||
method = null_ls.methods.FORMATTING,
|
||||
filetypes = { 'twig' },
|
||||
generator = require('null-ls.helpers').formatter_factory({
|
||||
command = 'ludtwig',
|
||||
args = {
|
||||
'--fix',
|
||||
'$FILENAME',
|
||||
},
|
||||
to_temp_file = true,
|
||||
from_temp_file = true,
|
||||
to_stdin = false,
|
||||
}),
|
||||
},
|
||||
}
|
||||
end)
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@ function M.setup()
|
|||
null_ls.builtins.diagnostics.alex,
|
||||
null_ls.builtins.diagnostics.trail_space,
|
||||
-- Formatter
|
||||
null_ls.builtins.diagnostics.markdownlint.with({
|
||||
extra_args = { '--disable', 'MD024' }, -- Duplicate Headings
|
||||
}),
|
||||
null_ls.builtins.diagnostics.markdownlint,
|
||||
}
|
||||
end)
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@ function M.setup()
|
|||
-- Diagnostics
|
||||
null_ls.builtins.diagnostics.stylelint,
|
||||
-- Formatter
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
command = 'prettierd',
|
||||
}),
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
}
|
||||
end)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue