-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
executable file
·39 lines (32 loc) · 1.48 KB
/
Copy pathinit.lua
File metadata and controls
executable file
·39 lines (32 loc) · 1.48 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
-- THIS WILL FORCE THE RTP OF THE INIT.LUA PARENT DIRECTORY TO BE ADDED TO NVIM RUNTIME PATH
--[[ local current_file = debug.getinfo(1).source:sub(2)
local parent_dir = vim.fn.fnamemodify(current_file, ":p:h:h")
vim.opt.rtp:prepend(parent_dir)
print("Config path: " .. vim.fn.stdpath("config")) ]]
vim.g.mapleader = " " -- change leader to a space
vim.g.maplocalleader = " " -- change localleader to a space
require("core.lazy")
require("config.options")
require("config.keymaps")
require("config.autocmds")
-- designates the pynvim provider to be used based on a shell variable IF a shell variable exists. This allows nvim to reference a different python executable when in a nix shell that defines the python3_host_prog environment variable
if vim.env.python3_host_prog then
vim.g.python3_host_prog = vim.env.python3_host_prog
end
-- require("core.mason-path")
-- require("core.lsp")
-- require("config.mason-verify")
-- require("config.health-check")
--[[ -- Define a function to open Oil in the current working directory
local function open_oil_on_startup()
-- Check if Neovim started without any file arguments
if #vim.api.nvim_list_bufs() == 1 and vim.bo.buftype == "" and vim.fn.argc() == 0 then
-- The first buffer is an empty, unlisted buffer, so open Oil
-- require("Fyler").open()
vim.cmd("Fyler")
end
end
-- Execute the function after Neovim has finished starting up
vim.api.nvim_create_autocmd("VimEnter", {
callback = open_oil_on_startup,
}) ]]