summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/core
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-05 03:40:16 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-05 03:40:16 +0900
commit3fc699eea5ec5d0d2986aa9e5982d7cbde722867 (patch)
treed5b54ddd6ba591aff4c4c4837a16cd9ca5b94440 /ar/.config/TheSiahxyz/lua/thesiahxyz/core
parentbc3c4dc00f4f61419217813a889574bfaafe3722 (diff)
updates
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/core')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua8
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua4
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/lazy.lua36
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/options.lua2
4 files changed, 39 insertions, 11 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
index e6eba4c..7ba527f 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
@@ -286,6 +286,14 @@ vim.api.nvim_create_autocmd("BufWritePost", {
end,
})
+-- Set vimwiki's index filetype to vimwiki instead of markdown
+local vimwiki_config = augroup("vimwiki_config")
+vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
+ group = vimwiki_config,
+ pattern = vim.fn.expand("~/.local/share/vimwiki/index.md"),
+ command = "setfiletype vimwiki",
+})
+
-- Run xrdb whenever Xdefaults or Xresources are updated.
local x_config = augroup("x_config")
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
index cc206ab..da9b3d6 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
@@ -1,7 +1,3 @@
--- Init leader Keys
-vim.g.mapleader = " "
-vim.g.maplocalleader = "\\"
-
-- Ascii
vim.keymap.set("n", "<leader>a1", ":.!toilet -w 200 -f bfraktur<cr>", { desc = "Ascii art bfraktur" })
vim.keymap.set("n", "<leader>a2", ":.!toilet -w 200 -f emboss<cr>", { desc = "Ascii art emboss" })
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/lazy.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/lazy.lua
index 8097325..7d0c281 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/lazy.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/lazy.lua
@@ -1,17 +1,39 @@
+-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-if not vim.loop.fs_stat(lazypath) then
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
- vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
-end ---@diagnostic disable-next-line: undefined-field
+ local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
+ if vim.v.shell_error ~= 0 then
+ vim.api.nvim_echo({
+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+ { out, "WarningMsg" },
+ { "\nPress any key to exit..." },
+ }, true, {})
+ vim.fn.getchar()
+ os.exit(1)
+ end
+end
vim.opt.rtp:prepend(lazypath)
+-- Make sure to setup `mapleader` and `maplocalleader` before
+-- loading lazy.nvim so that mappings are correct.
+-- This is also a good place to setup other settings (vim.opt)
+-- vim.g.mapleader = " "
+-- vim.g.maplocalleader = "\\"
+
+-- Setup lazy.nvim
require("lazy").setup({
+ -- highlight-start
spec = {
+ -- import your plugins
{ import = "thesiahxyz.plugins" },
},
- install = {
- colorscheme = { "catppuccin" },
- },
- change_detection = { notify = false },
+ -- highlight-end
+ -- Configure any other settings here. See the documentation for more details.
+ -- colorscheme that will be used when installing plugins.
+ install = { colorscheme = { "catppuccin" } },
+ -- automatically check for plugin updates
checker = { enabled = false },
+ -- automatically check for config file changes and reload the ui
+ change_detection = { enabled = false },
})
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/options.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/options.lua
index 9c1a6a6..6fb4afa 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/options.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/options.lua
@@ -7,6 +7,8 @@ vim.g.have_nerd_font = true
-- vim.g.netrw_winsize = 25
-- vim.g.loaded_netrw = 1
-- vim.g.loaded_netrwPlugin = 1
+vim.g.mapleader = " "
+vim.g.maplocalleader = "\\"
vim.opt.backup = false
vim.opt.breakindent = true
vim.opt.conceallevel = 1