1
Fork 0

Added so much stuff

This commit is contained in:
Matei Adriel 2023-01-10 02:38:06 +01:00
parent 1b17dc6cf3
commit 71f7586a61
100 changed files with 4404 additions and 33 deletions
dotfiles/neovim/ftplugin

View file

@ -0,0 +1,25 @@
local opts = function(desc)
return { desc = desc, buffer = true }
end
vim.keymap.set("n", "<leader>lf", ":source %<cr>", opts("Run [l]ua [f]ile "))
vim.keymap.set("n", "<leader>ls", function()
local path = vim.api.nvim_buf_get_name(0)
local status, M = pcall(dofile, path)
if status then
if M ~= nil then
if type(M.setup) == "function" then
M.setup()
print("M.setup() executed succesfully!")
else
print("Module does not return a setup function")
end
else
print("Module returned nil")
end
else
print("Cannot import current file :(")
end
end, opts("Run .setup() in current file"))