fix(lsp): pass in bufnr to formatter
This commit is contained in:
@@ -140,6 +140,7 @@ function M.setup()
|
|||||||
lhs = "<leader>lf",
|
lhs = "<leader>lf",
|
||||||
rhs = function()
|
rhs = function()
|
||||||
util.format({
|
util.format({
|
||||||
|
buf = bufnr,
|
||||||
cmd = { "shfmt", "-s", "-i", "4", "-" },
|
cmd = { "shfmt", "-s", "-i", "4", "-" },
|
||||||
output = "stdout",
|
output = "stdout",
|
||||||
})
|
})
|
||||||
@@ -221,6 +222,7 @@ function M.setup()
|
|||||||
lhs = "<leader>lf",
|
lhs = "<leader>lf",
|
||||||
rhs = function()
|
rhs = function()
|
||||||
util.format({
|
util.format({
|
||||||
|
buf = bufnr,
|
||||||
cmd = {
|
cmd = {
|
||||||
"golines",
|
"golines",
|
||||||
"-m",
|
"-m",
|
||||||
@@ -278,6 +280,7 @@ function M.setup()
|
|||||||
rhs = function()
|
rhs = function()
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
util.format({
|
util.format({
|
||||||
|
buf = bufnr,
|
||||||
cmd = {
|
cmd = {
|
||||||
"php-cs-fixer",
|
"php-cs-fixer",
|
||||||
"fix",
|
"fix",
|
||||||
@@ -370,6 +373,7 @@ function M.setup()
|
|||||||
lhs = "<leader>lf",
|
lhs = "<leader>lf",
|
||||||
rhs = function()
|
rhs = function()
|
||||||
util.format({
|
util.format({
|
||||||
|
buf = bufnr,
|
||||||
cmd = {
|
cmd = {
|
||||||
"stylua",
|
"stylua",
|
||||||
"--stdin-filepath",
|
"--stdin-filepath",
|
||||||
@@ -386,6 +390,7 @@ function M.setup()
|
|||||||
lhs = "<leader>lf",
|
lhs = "<leader>lf",
|
||||||
rhs = function()
|
rhs = function()
|
||||||
util.format({
|
util.format({
|
||||||
|
buf = bufnr,
|
||||||
cmd = {
|
cmd = {
|
||||||
"stylua",
|
"stylua",
|
||||||
"--range-start",
|
"--range-start",
|
||||||
@@ -440,6 +445,7 @@ function M.setup()
|
|||||||
rhs = function()
|
rhs = function()
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
util.format({
|
util.format({
|
||||||
|
buf = bufnr,
|
||||||
cmd = {
|
cmd = {
|
||||||
"ruff",
|
"ruff",
|
||||||
"check",
|
"check",
|
||||||
|
|||||||
Reference in New Issue
Block a user