diff --git a/config/clink/inputrc b/config/clink/inputrc new file mode 100644 index 0000000..7b02af3 --- /dev/null +++ b/config/clink/inputrc @@ -0,0 +1,10 @@ +$if clink + set mark-symlinked-directories on + set expand-tilde on + + "\C-W": unix-filename-rubout + "\t": old-menu-complete + + # Fix issue with Shift-Backspace not doing anything + "\e[27;2;8~": "\C-H" +$endif diff --git a/config/clink/starship.lua b/config/clink/starship.lua new file mode 100644 index 0000000..34df967 --- /dev/null +++ b/config/clink/starship.lua @@ -0,0 +1,3 @@ +-- Load starship + +load(io.popen('starship init cmd'):read("*a"))() diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 3f93c6e..7a8b602 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -44,6 +44,12 @@ vim.o.completeopt = "preview" vim.o.wildmode = "full" vim.o.cinoptions = "l1,b-s" vim.o.statusline = "%#LineNr# [%n] %#Default# %f%m%r %= %#StatusLineNC# %w[%{&ft == '' ? 'None' : ''}%Y] %#LineNr# Line: %l Column: %c " +vim.o.guifont = "Ubuntu Mono:h11" + +if vim.loop.os_uname().sysname == "Windows_NT" then + -- Workaround for https://github.com/neovim/neovim/issues/32504 + vim.o.shellpipe = ">%s 2>&1" +end vim.opt.errorformat = { "%f:%l:%c: fatal %trror: %m", -- gcc/clang fatal error @@ -239,13 +245,6 @@ local function MakeScratch() vim.api.nvim_buf_set_name(bufnr, "scratch") vim.api.nvim_buf_set_text(bufnr, 0, 0, 0, -1, { "-*- Scratch Buffer -*-" }) - - -- @Hack: There isn't really any way to get the fullscreen size, 150 greater than the - -- half-screen width on all of my devices as we don't want to split in that case - if vim.o.columns > 150 then - vim.cmd(string.format("vsplit #%d", bufnr)) - vim.cmd("wincmd p") - end end local function AlignEq() diff --git a/dots.bat b/dots.bat new file mode 100644 index 0000000..708f525 --- /dev/null +++ b/dots.bat @@ -0,0 +1,36 @@ +@ECHO OFF +SETLOCAL ENABLEDELAYEDEXPANSION + +IF "%1" == "install" ( + CALL :Install +) ELSE ( + IF "%1" == "pull" ( + CALL :Pull + ) ELSE ( + echo usage: %0 ^ + ) +) + +GOTO :EOF + +:Install + echo [Info] :: Installing dotfiles + + xcopy /E /I /Y /Q "config\nvim" "%LOCALAPPDATA%\nvim" > NUL + copy /Y "config\starship.toml" "%APPDATA%\" > NUL + copy /Y "config\clink\inputrc" "%LOCALAPPDATA%\.inputrc" > NUL + + WHERE /q "starship" + IF %ERRORLEVEL% equ 0 ( + IF NOT EXIST "%LOCALAPPDATA%\clink" ( MKDIR "%LOCALAPPDATA%\clink" ) + copy "config\clink\starship.lua" "%LOCALAPPDATA%\clink\" > NUL + ) +GOTO :EOF + +:Pull + echo [Info] :: Pulling dotfile changes + + xcopy /E /I /Y "%LOCALAPPDATA%\nvim" "config\nvim" + copy /Y "%APPDATA%\starship.toml" "config\" + copy /Y "%LOCALAPPDATA%\.inputrc" "config\clink\inputrc" +GOTO :EOF