From f0bf896d1372c69d8ad7889564a28168954d8123 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Sat, 18 Apr 2026 11:18:23 -0400 Subject: update --- .config/nvim/ftplugin/lua.lua | 3 +++ .config/nvim/init.lua | 36 ++---------------------------------- .config/nvim/lsp/clangd.lua | 10 ++++++++++ .config/nvim/lsp/lua_ls.lua | 17 +++++++++++++++++ .local/bin/tsarbar_status.sh | 20 ++++++++++---------- update.sh | 1 + 6 files changed, 43 insertions(+), 44 deletions(-) create mode 100644 .config/nvim/ftplugin/lua.lua create mode 100644 .config/nvim/lsp/clangd.lua create mode 100644 .config/nvim/lsp/lua_ls.lua diff --git a/.config/nvim/ftplugin/lua.lua b/.config/nvim/ftplugin/lua.lua new file mode 100644 index 0000000..9c6b1dc --- /dev/null +++ b/.config/nvim/ftplugin/lua.lua @@ -0,0 +1,3 @@ +vim.o.tabstop = 2 +vim.o.shiftwidth = 2 +vim.treesitter.stop() -- get this TRASH outta here diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 136d2fe..7df64c2 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -30,29 +30,10 @@ vim.opt.cinoptions:append(":0,N-s,E-s,(s,Ws") vim.g.mapleader = " " vim.g.netrw_banner = 0 --- I know ftplugin exists, but I don't wanna use it -local lang_conf = { - lua = { - tabstop = 2, - shiftwidth = 2, - } -} - -for lang, conf in pairs(lang_conf) do - vim.api.nvim_create_autocmd("FileType", { - pattern = lang, - callback = function() - for k, v in pairs(conf) do - vim.o[k] = v - end - end, - }) -end - vim.pack.add({ - "https://github.com/neovim/nvim-lspconfig", "https://codeberg.org/comfysage/artio.nvim", "https://github.com/tpope/vim-fugitive", + "https://git.iamcheeseman.net/mooncheese.nvim.git", }) @@ -69,11 +50,6 @@ require("artio").setup({ }, }) -vim.api.nvim_create_autocmd("FileType", { - pattern = "lua", - callback = function() vim.treesitter.stop() end, -}) - vim.keymap.set("n", "f", function() require("artio.builtins").files({ findprg = [[ find . -type f -iregex '.*$*.*' -not -path '*/.*' ]] @@ -98,14 +74,6 @@ vim.api.nvim_create_user_command("SwapFile", function() print("no files to swap to") end, {}) --- gd and gD don't work until you open a file, so this commands loads all the --- files in the directory you're in. -vim.api.nvim_create_user_command("OpenAll", function() - local bufnr = vim.api.nvim_get_current_buf() - vim.cmd[[arg **/*]] - vim.api.nvim_set_current_buf(bufnr) -end, {}) - vim.api.nvim_create_autocmd("LspAttach", { callback = function(ev) local opts = {silent=true, buffer=ev.buf} @@ -120,7 +88,7 @@ vim.diagnostic.config({ severity_sort = true, }) -vim.cmd.colorscheme("suncheese") +vim.cmd.colorscheme("mooncheese") vim.api.nvim_set_hl(0, "Cursor_i", {bg="#00FFFF"}) vim.api.nvim_set_hl(0, "Cursor_v", {bg="#FF00FF"}) diff --git a/.config/nvim/lsp/clangd.lua b/.config/nvim/lsp/clangd.lua new file mode 100644 index 0000000..cbe0fb3 --- /dev/null +++ b/.config/nvim/lsp/clangd.lua @@ -0,0 +1,10 @@ +return { + cmd = {"clangd", "-j=6"}, + filetypes = {"c", "h", "cpp", "hpp", "cc", "hh"}, + root_markers = { + ".clangd", + "compile_commands.json", + "compile_flags.txt", + ".git", + }, +} diff --git a/.config/nvim/lsp/lua_ls.lua b/.config/nvim/lsp/lua_ls.lua new file mode 100644 index 0000000..ace2329 --- /dev/null +++ b/.config/nvim/lsp/lua_ls.lua @@ -0,0 +1,17 @@ +return { + cmd = {"lua-language-server"}, + filetypes = {"lua"}, + root_markers = {".luarc.json", ".git"}, + settings = { + Lua = { + runtime = { + version = "LuaJIT", + }, + diagnostics = { + disable = { + "lowercase-global", + }, + }, + }, + }, +} diff --git a/.local/bin/tsarbar_status.sh b/.local/bin/tsarbar_status.sh index 3fe67fb..b1eeb83 100755 --- a/.local/bin/tsarbar_status.sh +++ b/.local/bin/tsarbar_status.sh @@ -74,16 +74,16 @@ done & playerctl -F metadata -f "{{lc(status)}} {{lc(title)}} - {{lc(artist)}}" \ | while read -r line; do - status=`echo $line | awk '{ print $1 }'` - case "$status" in - "paused") - tsarc set player -text "no media" - ;; - "playing") - tsarc set player -text \ - "`echo $line | awk 'match($0, $1) {print substr($0, RSTART+RLENGTH)}' | trim`" - ;; - esac + status=`echo $line | awk '{ print $1 }'` + case "$status" in + "paused") + tsarc set player -text "no media" + ;; + "playing") + tsarc set player -text \ + "`echo $line | awk 'match($0, $1) {print substr($0, RSTART+RLENGTH)}' | trim`" + ;; + esac done & while true; do diff --git a/update.sh b/update.sh index df7e085..fbc7d09 100755 --- a/update.sh +++ b/update.sh @@ -19,6 +19,7 @@ cp ~/git/dmenu/config.h ./src/dmenu # Neovim cp -r ~/.config/nvim .config rm -rf .config/nvim/nvim-pack-lock.json +rm -rf .config/nvim/.luarc.json # bspwm cp -r ~/.config/bspwm .config -- cgit v1.3-2-g0d8e