Skip to content

Commit

Permalink
fix: clean up lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
willruggiano committed Nov 4, 2024
1 parent 6cb6048 commit a86e136
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 230 deletions.

This file was deleted.

19 changes: 17 additions & 2 deletions plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ return function()
local js = { "biome", "injected" }
local sh = { "shfmt", "shellcheck", "shellharden" }

require("conform").setup {
local conform = require "conform"

conform.setup {
default_format_opts = {
lsp_format = "fallback",
},
Expand Down Expand Up @@ -39,12 +41,25 @@ return function()
},
}

conform.formatters.injected = {
options = {
ignore_errors = false,
lang_to_formatters = {
sql = { "sqlfluff" }, -- what are the odds this works?
},
},
}

vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"

vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*",
callback = function(args)
require("conform").format { bufnr = args.buf }
require("conform").format {
bufnr = args.buf,
lsp_fallback = true,
quiet = true,
}
end,
})
end
5 changes: 0 additions & 5 deletions plugins/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ return function()
dap.step_out,
{ desc = "[dap] Step out" },
},
-- TODO: It'd be nice for this to be part of hover?
["<localleader>e"] = {
dapui.eval,
{ desc = "[dap] Evaluate expression" },
},
}

vim.api.nvim_create_user_command("DapBreakpoints", function()
Expand Down
Loading

0 comments on commit a86e136

Please sign in to comment.