nvim: Formatting

This commit is contained in:
Marty Oehme 2024-06-06 09:43:20 +02:00
parent 7eeeb9e85d
commit c03b88c6cc
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
3 changed files with 53 additions and 30 deletions

View file

@ -22,7 +22,9 @@ local formatters = {
javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
json = { "jq" },
liquid = { { "prettierd", "prettier" } },
lua = { "stylua" },
markdown = { { "prettierd", "prettier" } },
python = { "ruff_fix", "ruff_format" },
sh = { "shfmt" },
svelte = { { "prettierd", "prettier" } },
@ -123,7 +125,7 @@ return {
end,
})
end,
event = { "BufWritePost", "InsertLeave" },
event = { "BufWritePre", "InsertEnter" },
},
-- formatting setup
@ -248,6 +250,7 @@ return {
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-neotest/nvim-nio",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",

View file

@ -71,7 +71,15 @@ local prose_plugs = {
require("zk").edit(opts, { title = "Zk Orphans" })
end)
end
require("zk").setup({ picker = "telescope" })
require("zk").setup({
picker = "telescope",
lsp = {
auto_attach = {
enabled = true,
filteypes = { "markdown", "quarto" },
},
},
})
end,
ft = writing_ft,
cmd = {

View file

@ -3,34 +3,46 @@ return {
{
"nvim-lualine/lualine.nvim",
requires = { "nvim-tree/nvim-web-devicons", config = true },
opts = {
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {},
always_divide_middle = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
inactive_sections = {
lualine_a = {},
lualine_b = { "branch", "diff" },
lualine_c = { "filename" },
lualine_x = {},
lualine_y = { "location" },
lualine_z = {},
},
tabline = {},
extensions = { "quickfix", "toggleterm" },
},
config = function()
-- FIXME: Errors out on no pynvim installed
-- local function molten()
-- if
-- require("core.util").is_available("molten.status")
-- and require("molten.status").initialized() ~= ""
-- then
-- return "󱪄"
-- end
-- return ""
-- end
require("lualine").setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {},
always_divide_middle = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "encoding", "fileformat", "filetype", "molten" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
inactive_sections = {
lualine_a = {},
lualine_b = { "branch", "diff" },
lualine_c = { "filename" },
lualine_x = {},
lualine_y = { "location" },
lualine_z = {},
},
tabline = {},
extensions = { "quickfix", "toggleterm" },
})
end,
event = { "BufNewFile", "BufAdd", "BufWinEnter" },
},
-- create pretty unobtrusive notifications