mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nvim/lsp: move out non-lsp formatting bindings
This commit is contained in:
parent
a644f3c688
commit
ce5e5610e1
4 changed files with 19 additions and 26 deletions
|
|
@ -28,35 +28,11 @@ local servers = {
|
|||
-- golangci_lint_ls = {},
|
||||
|
||||
fish_lsp = {},
|
||||
bashls = {},
|
||||
|
||||
bashls = { -- Bash
|
||||
on_attach = function(_, bufno)
|
||||
map("n", "<leader>f", function()
|
||||
local saved = vim.fn.winsaveview()
|
||||
vim.cmd([[silent exec "%!shfmt"]])
|
||||
vim.fn.winrestview(saved)
|
||||
end, { buffer = bufno })
|
||||
end,
|
||||
},
|
||||
|
||||
tinymist = {
|
||||
on_attach = function(_, bufno)
|
||||
map("n", "<leader>f", function()
|
||||
local saved = vim.fn.winsaveview()
|
||||
vim.cmd([[silent exec "%!typstyle -c 100"]])
|
||||
vim.fn.winrestview(saved)
|
||||
end, { buffer = bufno })
|
||||
end,
|
||||
},
|
||||
tinymist = {},
|
||||
|
||||
lua_ls = { -- Lua
|
||||
on_attach = function(_, bufno)
|
||||
map("n", "<leader>f", function()
|
||||
local saved = vim.fn.winsaveview()
|
||||
vim.cmd([[silent exec "!stylua %"]])
|
||||
vim.fn.winrestview(saved)
|
||||
end, { buffer = bufno })
|
||||
end,
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue