diff options
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua | 8 | ||||
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/utils/utils.lua | 29 | ||||
| -rw-r--r-- | ar/.config/newsboat/urls | 8 |
3 files changed, 40 insertions, 5 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua index 3ce4427..3bd702a 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua @@ -3,6 +3,7 @@ local function augroup(name) end local autocmd = vim.api.nvim_create_autocmd +local home = os.getenv("HOME") -- Change the color of symlink files to distinguish between directory and symlink files autocmd("FileType", { @@ -181,7 +182,10 @@ local function organize_imports() command = "pyright.organizeimports", arguments = { vim.uri_from_bufnr(0) }, } - vim.lsp.buf.execute_command(params) + local clients = vim.lsp.get_clients({ bufnr = 0 }) + for _, client in ipairs(clients) do + client:exec_cmd(params, { bufnr = 0 }) + end end autocmd("LspAttach", { @@ -323,9 +327,7 @@ autocmd("BufWritePost", { }) -- Recompile suckless programs on config edit. -local home = os.getenv("HOME") local suckless_config = vim.api.nvim_create_augroup("suckless_config", { clear = true }) - autocmd("BufWritePost", { group = suckless_config, pattern = home .. "/.local/src/suckless/dmenu/config.def.h", diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/utils/utils.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/utils/utils.lua index 8b9b85b..00a4457 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/utils/utils.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/utils/utils.lua @@ -115,4 +115,33 @@ function M.create_floating_scratch(content) vim.api.nvim_buf_set_keymap(buf, "n", "q", ":q!<CR>", { noremap = true, silent = true }) end +function M.scrollRight(cols) + cols = cols or 10 + vim.wo.wrap = false + for _ = 1, cols do + vim.cmd("normal! zl") + end +end + +function M.scrollLeft(cols) + cols = cols or 10 + vim.wo.wrap = false + for _ = 1, cols do + vim.cmd("normal! zh") + end +end + +vim.api.nvim_set_keymap( + "n", + "H", + "<Cmd>lua require('TheSiahxyz.utils.utils').scrollLeft()<cr>", + { noremap = true, silent = true, desc = "Scroll left" } +) +vim.api.nvim_set_keymap( + "n", + "L", + "<Cmd>lua require('TheSiahxyz.utils.utils').scrollRight()<cr>", + { noremap = true, silent = true, desc = "Scroll right" } +) + return M diff --git a/ar/.config/newsboat/urls b/ar/.config/newsboat/urls index 61640e5..8bbe462 100644 --- a/ar/.config/newsboat/urls +++ b/ar/.config/newsboat/urls @@ -13,8 +13,12 @@ https://github.com/TheSiahxyz/suckless/commits/master.atom "~TheSiahx "--- News ---" https://www.archlinux.org/feeds/news/ "~Arch" Distro Linux Tech https://artixlinux.org/feed.php "~Artix" Distro Linux Tech -filter:~/.local/bin/decodetitle:https://ftr.thesiah.xyz/makefulltextfeed.php?url=sec%3A%2F%2Ffeeds.bbci.co.uk%2Fnews%2Ftechnology%2Frss.xml&max=200&links=preserve&exc=&submit=Create+Feed "~AI" AI News -filter:~/.local/bin/decodetitle:https://ftr.thesiah.xyz/makefulltextfeed.php?url=sec%3A%2F%2Fwww.koreaherald.com%2Frss%2Fkh_Business&max=200&links=preserve&exc=&submit=Create+Feed "~Business (KOR)" Business News +filter:~/.local/bin/decodetitle:https://ftr.thesiah.xyz/makefulltextfeed.php?url=sec%3A%2F%2Ffeeds.bbci.co.uk%2Fnews%2Ftechnology%2Frss.xml&max=200&links=preserve&exc=&submit=Create+Feed "~AI" AI News +filter:~/.local/bin/decodetitle:https://ftr.thesiah.xyz/makefulltextfeed.php?url=sec%3A%2F%2Fwww.koreaherald.com%2Frss%2Fkh_Business&max=200&links=preserve&exc=&submit=Create+Feed "~Business (KOR)" Business News +https://ftr.thesiah.xyz/makefulltextfeed.php?url=www.yonhapnewstv.co.kr%2Fbrowse%2Ffeed%2F&max=200&links=preserve&exc=&submit=Create+Feed "~Newsflesh (KOR)" News +https://ftr.thesiah.xyz/makefulltextfeed.php?url=www.yonhapnewstv.co.kr%2Fcategory%2Fnews%2Fpolitics%2Ffeed%2F&max=200&links=preserve&exc=&submit=Create+Feed "~Politics (KOR)" News Politics +https://ftr.thesiah.xyz/makefulltextfeed.php?url=www.yonhapnewstv.co.kr%2Fcategory%2Fnews%2Feconomy%2Ffeed%2F&max=200&links=preserve&exc=&submit=Create+Feed "~Economy (KOR)" Economy News +https://ftr.thesiah.xyz/makefulltextfeed.php?url=www.yonhapnewstv.co.kr%2Fcategory%2Fnews%2Fsociety%2Ffeed%2F&max=200&links=preserve&exc=&submit=Create+Feed "~Society (KOR)" News Society " " "--- Blog ---" https://lukesmith.xyz/rss.xml "~Luke Smith" Blog |
