summaryrefslogtreecommitdiff
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
parentbc3c4dc00f4f61419217813a889574bfaafe3722 (diff)
updates
-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
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/init.lua4
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua23
6 files changed, 47 insertions, 30 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
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/init.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/init.lua
index 2a8bc78..f0204cf 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/init.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/init.lua
@@ -1,7 +1,7 @@
-- Core
-require("thesiahxyz.core.autocmds")
-require("thesiahxyz.core.keymaps")
require("thesiahxyz.core.options")
+require("thesiahxyz.core.keymaps")
+require("thesiahxyz.core.autocmds")
require("thesiahxyz.core.lazy")
-- Custom
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
index 4d01f59..a14181c 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
@@ -1,19 +1,6 @@
return {
{
"vimwiki/vimwiki",
- cmd = {
- "VimwikiIndex",
- "VimwikiDeleteFile",
- "Vimwiki2HTML",
- "VimwikiAll2HTML",
- "Vimwiki2HTMLBrowse",
- "VimwikiGoto",
- "VimwikiRenameFile",
- "VimwikiSplitLink",
- "VimwikiVSplitLink",
- "VimwikiColorize",
- "VimwikiDiaryGenerateLinks",
- },
init = function()
local wk = require("which-key")
wk.add({
@@ -21,6 +8,7 @@ return {
{ "<leader>w", group = "Vimwiki/Which-key" },
{ "<leader>w<leader>", group = "Diary" },
})
+
-- Ensure files are read with the desired filetype
vim.g.vimwiki_ext2syntax = {
[".Rmd"] = "markdown",
@@ -29,6 +17,7 @@ return {
[".markdown"] = "markdown",
[".mdown"] = "markdown",
}
+
-- Set up Vimwiki list
vim.g.vimwiki_list = {
{
@@ -44,8 +33,8 @@ return {
},
{
"tools-life/taskwiki",
- cmd = { "TaskWikiInfo", "TaskWikiSummary", "TaskWikiStart", "TaskWikiMod" },
ft = "vimwiki",
+ event = "VeryLazy",
dependencies = {
"vimwiki/vimwiki",
"powerman/vim-plugin-AnsiEsc",
@@ -53,9 +42,6 @@ return {
"farseer90718/vim-taskwarrior",
},
config = function()
- vim.g.taskwiki_markup_syntax = "markdown"
- vim.g.taskwiki_data_location = "~/.local/share/task"
-
local wk = require("which-key")
wk.add({
mode = { "n" },
@@ -64,6 +50,9 @@ return {
{ "<leader>tG", group = "Ghistory" },
{ "<leader>th", group = "History" },
})
+
+ vim.g.taskwiki_markup_syntax = "markdown"
+ vim.g.taskwiki_data_location = "~/.local/share/task"
end,
},
}