-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
28 lines (24 loc) · 826 Bytes
/
init.lua
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
vim.loader.enable()
---@diagnostic disable-next-line: undefined-field
OS = vim.loop.os_uname().sysname
require("basic")
require("keybindings")
require("plugins")
require("neovide")
vim.g.hlchunk_files = "*.ts,*.js,*.json,*.go,*.c,*.cpp,*.rs,*.h,*.hpp,*.lua,*.py,*.dart"
vim.o.switchbuf = "useopen,usetab,newtab"
local group = vim.api.nvim_create_augroup("BufLast", { clear = true })
vim.api.nvim_create_autocmd("BufDelete", {
group = group,
callback = function()
local buf = vim.api.nvim_get_current_buf()
local opt = { noremap = true, silent = true, buffer = buf }
local keymap = vim.keymap -- for conciseness
local name = vim.fn.expand("%:t")
if name == nil or name == "" then
keymap.set("n", "<c-p>", function()
require("telescope").extensions.my_file_find.find_files({})
end, opt)
end
end,
})