Repository navigation
Expand file tree
/
Copy pathinit.lua
More file actions
61 lines (52 loc) · 2.24 KB
/
Copy pathinit.lua
File metadata and controls
61 lines (52 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require("config.lazy")
vim.opt.shiftwidth = 4
vim.opt.clipboard = "unnamedplus"
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.termguicolors = true
vim.o.shell = "pwsh.exe"
vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>")
vim.keymap.set("n", "<space>x", ":.lua<CR>")
vim.keymap.set("v", "<space>x", ":lua<CR>")
vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "*",
callback = function()
vim.cmd("hi Normal ctermbg=NONE guibg=NONE")
vim.cmd("hi NonText ctermbg=NONE guibg=NONE")
end,
})
vim.api.nvim_set_keymap("t", "kj", "<C-\\><C-n>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "kj", "<Esc>", { noremap = true, silent = true })
vim.api.nvim_create_autocmd("TermOpen", {
group = vim.api.nvim_create_augroup("custom-term-open", { clear = true }),
callback = function()
vim.opt.number = false
vim.opt.relativenumber = false
end,
})
vim.opt.spelllang = "en_us"
vim.opt.spell = true
vim.diagnostic.config({
virtual_text = true,
})
vim.cmd("colorscheme kanagawa-dragon")
-- vim.diagnostic.config({
-- virtual_text = false, -- Turn off inline diagnostics
-- })
--
-- -- Use this if you want it to automatically show all diagnostics on the
-- -- current line in a floating window. Personally, I find this a bit
-- -- distracting and prefer to manually trigger it (see below). The
-- -- CursorHold event happens when after `updatetime` milliseconds. The
-- -- default is 4000 which is much too long
-- vim.cmd("autocmd CursorHold * lua vim.diagnostic.open_float({scope='line'})")
-- vim.o.updatetime = 300
--
-- -- Show all diagnostics on current line in floating window
-- vim.api.nvim_set_keymap("n", "<Leader>d", ":lua vim.diagnostic.open_float()<CR>", { noremap = true, silent = true })
-- -- Go to next diagnostic (if there are multiple on the same line, only shows
-- -- one at a time in the floating window)
-- vim.api.nvim_set_keymap("n", "<Leader>n", ":lua vim.diagnostic.goto_next()<CR>", { noremap = true, silent = true })
-- -- Go to prev diagnostic (if there are multiple on the same line, only shows
-- -- one at a time in the floating window)
-- vim.api.nvim_set_keymap("n", "<Leader>p", ":lua vim.diagnostic.goto_prev()<CR>", { noremap = true, silent = true })