Save
This commit is contained in:
@@ -14,6 +14,9 @@ vim.keymap.set("n", "<C-s>", "<cmd>noautocmd w <CR>", opts)
|
||||
-- quit file
|
||||
vim.keymap.set("n", "<C-q>", "<cmd> q <CR>", opts)
|
||||
|
||||
-- activate spelling
|
||||
vim.keymap.set("n", "<leader>sp", ":set spell!<CR>")
|
||||
|
||||
-- delete single character without copying into register
|
||||
vim.keymap.set("n", "x", '"_x', opts)
|
||||
|
||||
|
@@ -36,7 +36,7 @@ return {
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("<CR>", " Select Session", ":SessionSearch <CR>"),
|
||||
dashboard.button("<CR>", " Select Session", ":AutoSession search <CR>"),
|
||||
dashboard.button("<leader>ff", " Open file", ":Neotree float <CR>"),
|
||||
dashboard.button("<leader>fr", " Open recent files.", ":Telescope oldfiles <CR>"),
|
||||
}
|
||||
|
@@ -189,6 +189,7 @@ return {
|
||||
yamlls = {},
|
||||
clangd = {},
|
||||
ocamllsp = {},
|
||||
tinymist = {},
|
||||
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
|
@@ -18,8 +18,8 @@ return {
|
||||
"shfmt", -- Shell formatter
|
||||
"checkmake", -- linter for Makefiles
|
||||
"ruff", -- Python linter and formatter
|
||||
"clangd",
|
||||
"ocamlformat",
|
||||
"clangd", -- c/cpp formatter and linter
|
||||
"ocamlformat", -- ocaml formatter
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
@@ -35,6 +35,25 @@ return {
|
||||
}),
|
||||
require("none-ls.formatting.ruff_format"),
|
||||
formatting.clang_format,
|
||||
formatting.ocamlformat,
|
||||
-- require("none-ls.formatting.ocamlformat").with({
|
||||
-- extra_args = {
|
||||
-- "--if-then-else",
|
||||
-- "vertical",
|
||||
-- "--break-cases",
|
||||
-- "fit-or-vertical",
|
||||
-- "--type-decl",
|
||||
-- "sparse",
|
||||
-- "--type-decl-indent",
|
||||
-- "4",
|
||||
-- "--function-indent",
|
||||
-- "4",
|
||||
-- "--match-indent",
|
||||
-- "4",
|
||||
-- "--let-binding-indent",
|
||||
-- "4",
|
||||
-- },
|
||||
-- }),
|
||||
}
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
@@ -49,6 +68,7 @@ return {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
print("test")
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end,
|
||||
})
|
||||
|
@@ -1,18 +1,14 @@
|
||||
return {
|
||||
"rmagatti/auto-session",
|
||||
config = function()
|
||||
require("auto-session").setup({
|
||||
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||
session_lens = {
|
||||
buftypes_to_ignore = {},
|
||||
load_on_setup = true,
|
||||
theme_conf = { border = true },
|
||||
previewer = false,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<Leader>ls", require("auto-session.session-lens").search_session, {
|
||||
noremap = true,
|
||||
})
|
||||
end,
|
||||
lazy = false,
|
||||
keys = {
|
||||
{ "<leader>ls", "<cmd>AutoSession search<CR>", desc = "Session search" },
|
||||
},
|
||||
---enables autocomplete for opts
|
||||
---@module "auto-session"
|
||||
---@type AutoSession.Config
|
||||
opts = {
|
||||
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||
-- log_level = 'debug',
|
||||
},
|
||||
}
|
||||
|
8
lua/plugins/typst_preview.lua
Normal file
8
lua/plugins/typst_preview.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"chomosuke/typst-preview.nvim",
|
||||
lazy = false, -- or ft = 'typst'
|
||||
version = "1.*",
|
||||
opts = {
|
||||
open_cmd = "chromium %s",
|
||||
}, -- lazy.nvim will implicitly calls `setup {}`
|
||||
}
|
Reference in New Issue
Block a user