Compare commits
No commits in common. "aa8ac561c5bb22828d060541f0450a96e6ead243" and "14dbe77db406d36b4e422f7247ccdd803b96d46b" have entirely different histories.
aa8ac561c5
...
14dbe77db4
5 changed files with 2 additions and 28 deletions
|
|
@ -5,8 +5,8 @@ vim.g.maplocalleader = ";"
|
|||
-- source current file
|
||||
vim.keymap.set("n", "<Leader> ", ":update<CR> :source<CR>", { desc = "Source current lua file" })
|
||||
|
||||
-- -- format
|
||||
-- vim.keymap.set("n", "<Leader>lf", vim.lsp.buf.format, { desc = "Format buffer with available lsp" })
|
||||
-- format
|
||||
vim.keymap.set("n", "<Leader>lf", vim.lsp.buf.format, { desc = "Format buffer with available lsp" })
|
||||
|
||||
-- easy copy/cut/paste from system clipboard
|
||||
vim.keymap.set({ "n", "v", "x" }, "<Leader>y", '"+y', { desc = "Yank to system clipboard" })
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
vim.pack.add({
|
||||
{src = "https://github.com/stevearc/conform.nvim"},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("Format", function(args)
|
||||
local range = nil
|
||||
if args.count ~= -1 then
|
||||
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
||||
range = {
|
||||
start = { args.line1, 0 },
|
||||
["end"] = { args.line2, end_line:len() },
|
||||
}
|
||||
end
|
||||
require("conform").format({ async = true, lsp_format = "fallback", range = range })
|
||||
end, { range = true })
|
||||
|
||||
vim.keymap.set("n", "<Leader>lf", ":Format<CR>", { desc = "Format buffer with available lsp" })
|
||||
|
|
@ -3,4 +3,3 @@ require("plugins.treesitter")
|
|||
require("plugins.lsp")
|
||||
require("plugins.mini")
|
||||
require("plugins.markdown")
|
||||
require("plugins.conform")
|
||||
|
|
|
|||
|
|
@ -21,12 +21,8 @@ vim.lsp.enable({
|
|||
"nixd",
|
||||
"lua_ls",
|
||||
"jsonls",
|
||||
"html",
|
||||
"marksman",
|
||||
"gopls",
|
||||
"ruff",
|
||||
"basedpyright",
|
||||
"yamlls",
|
||||
})
|
||||
|
||||
-- diagnostic settings
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"plugins": {
|
||||
"conform.nvim": {
|
||||
"rev": "26c02e1",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"gruvbox.nvim": {
|
||||
"rev": "5e0a460",
|
||||
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue