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 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 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 twigcs &>/dev/null || composer global require "friendsoftwig/twigcs=*" -n
|
||||||
|
command -v ludtwig &>/dev/null || cargo install ludtwig
|
||||||
|
|
||||||
# Rust
|
# Rust
|
||||||
command -v cargo-clippy &>/dev/null || rustup component add clippy
|
command -v cargo-clippy &>/dev/null || rustup component add clippy
|
||||||
|
|
|
@ -163,17 +163,17 @@ K.CODE = {
|
||||||
},
|
},
|
||||||
GOTO_DEFINITION = {
|
GOTO_DEFINITION = {
|
||||||
mode = 'n',
|
mode = 'n',
|
||||||
shortcut = '<Leader>cg',
|
shortcut = '<Leader>cgd',
|
||||||
description = 'Go to Definition',
|
description = 'Go to Definition',
|
||||||
},
|
},
|
||||||
PEEK_DEFINITION = {
|
PEEK_DEFINITION = {
|
||||||
mode = 'n',
|
mode = 'n',
|
||||||
shortcut = '<Leader>cp',
|
shortcut = '<Leader>cpd',
|
||||||
description = 'Peek Code Definition',
|
description = 'Peek Code Definition',
|
||||||
},
|
},
|
||||||
GOTO_REFERENCES = {
|
GOTO_REFERENCES = {
|
||||||
mode = 'n',
|
mode = 'n',
|
||||||
shortcut = '<Leader>cr',
|
shortcut = '<Leader>cgr',
|
||||||
description = 'Go to References',
|
description = 'Go to References',
|
||||||
},
|
},
|
||||||
ACTIONS = {
|
ACTIONS = {
|
||||||
|
@ -181,11 +181,6 @@ K.CODE = {
|
||||||
shortcut = '<Leader>ca',
|
shortcut = '<Leader>ca',
|
||||||
description = 'Do Code Actions',
|
description = 'Do Code Actions',
|
||||||
},
|
},
|
||||||
ERROR = {
|
|
||||||
mode = 'n',
|
|
||||||
shortcut = '<leader>ce',
|
|
||||||
description = 'Show Code Errors',
|
|
||||||
},
|
|
||||||
FORMAT = {
|
FORMAT = {
|
||||||
mode = 'n',
|
mode = 'n',
|
||||||
shortcut = '<Leader>cf',
|
shortcut = '<Leader>cf',
|
||||||
|
@ -193,7 +188,7 @@ K.CODE = {
|
||||||
},
|
},
|
||||||
RENAME = {
|
RENAME = {
|
||||||
mode = 'n',
|
mode = 'n',
|
||||||
shortcut = '<Leader>cn',
|
shortcut = '<Leader>cr',
|
||||||
description = 'Rename Variable',
|
description = 'Rename Variable',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,12 +56,6 @@ return {
|
||||||
vim.lsp.buf.code_action,
|
vim.lsp.buf.code_action,
|
||||||
{ desc = K.CODE.ACTIONS.description }
|
{ 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,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ return {
|
||||||
'akinsho/toggleterm.nvim',
|
'akinsho/toggleterm.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
local terminal = require('toggleterm')
|
local terminal = require('toggleterm')
|
||||||
terminal.setup()
|
terminal.setup({shell = '/usr/bin/zsh'})
|
||||||
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
K.TOGGLE_TERMINAL.mode,
|
K.TOGGLE_TERMINAL.mode,
|
||||||
|
|
|
@ -1,37 +1,25 @@
|
||||||
return {
|
return {
|
||||||
{
|
'folke/noice.nvim',
|
||||||
'folke/noice.nvim',
|
dependencies = {
|
||||||
dependencies = {
|
'MunifTanjim/nui.nvim',
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
'rcarriga/nvim-notify',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('noice').setup({
|
|
||||||
lsp = {
|
|
||||||
override = {
|
|
||||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
|
||||||
['vim.lsp.util.stylize_markdown'] = true,
|
|
||||||
['cmp.entry.get_documentation'] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
bottom_search = false,
|
|
||||||
command_palette = true,
|
|
||||||
long_message_to_split = true,
|
|
||||||
inc_rename = false,
|
|
||||||
lsp_doc_border = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'rcarriga/nvim-notify',
|
'rcarriga/nvim-notify',
|
||||||
config = function()
|
|
||||||
local notify = require('notify')
|
|
||||||
notify.setup({
|
|
||||||
render = 'wrapped-compact',
|
|
||||||
timeout = 750,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
config = function()
|
||||||
|
require('noice').setup({
|
||||||
|
lsp = {
|
||||||
|
override = {
|
||||||
|
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||||
|
['vim.lsp.util.stylize_markdown'] = true,
|
||||||
|
['cmp.entry.get_documentation'] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
presets = {
|
||||||
|
bottom_search = false,
|
||||||
|
command_palette = true,
|
||||||
|
long_message_to_split = true,
|
||||||
|
inc_rename = false,
|
||||||
|
lsp_doc_border = false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,21 @@ function M.setup()
|
||||||
prefer_local = 'vendor/bin/php-cs-fixer',
|
prefer_local = 'vendor/bin/php-cs-fixer',
|
||||||
args = { 'fix', '--allow-risky=yes', '$FILENAME' },
|
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)
|
end)
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,7 @@ function M.setup()
|
||||||
null_ls.builtins.diagnostics.alex,
|
null_ls.builtins.diagnostics.alex,
|
||||||
null_ls.builtins.diagnostics.trail_space,
|
null_ls.builtins.diagnostics.trail_space,
|
||||||
-- Formatter
|
-- Formatter
|
||||||
null_ls.builtins.diagnostics.markdownlint.with({
|
null_ls.builtins.diagnostics.markdownlint,
|
||||||
extra_args = { '--disable', 'MD024' }, -- Duplicate Headings
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,7 @@ function M.setup()
|
||||||
-- Diagnostics
|
-- Diagnostics
|
||||||
null_ls.builtins.diagnostics.stylelint,
|
null_ls.builtins.diagnostics.stylelint,
|
||||||
-- Formatter
|
-- Formatter
|
||||||
null_ls.builtins.formatting.prettier.with({
|
null_ls.builtins.formatting.prettierd,
|
||||||
command = 'prettierd',
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue