refactor + feat: replaced nvim-cmp w/ coq_nvim and refactored everything
This commit is contained in:
parent
f82cc2bc93
commit
7a906314d8
19 changed files with 435 additions and 311 deletions
|
|
@ -1,26 +1,41 @@
|
|||
-- Using formatter.nvim: https://github.com/mhartington/formatter.nvim
|
||||
-- Homepage: https://github.com/mhartington/formatter.nvim
|
||||
|
||||
-- What is it?
|
||||
-- Formatter plugin, helps with formatting code on saving the file.
|
||||
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
|
||||
-- This will provide type hinting with LuaLS
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" },
|
||||
javascript = { "prettier" } -- add stop_after_first if you want more than 1
|
||||
javascript = { "prettier" }, -- add stop_after_first for n > 1
|
||||
typescript = { "prettier" },
|
||||
sh = { "shfmt", "shellcheck" },
|
||||
bash = { "shfmt", "shellcheck" },
|
||||
},
|
||||
formatters = {
|
||||
prettier = {
|
||||
prepend_args = function()
|
||||
return { "" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback"
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
},
|
||||
format_on_save = { timeout_ms = 500 },
|
||||
},
|
||||
init = function ()
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end
|
||||
}
|
||||
|
||||
init = function()
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue