Made config vaguely work on Windows
Added dots.bat script for installing and pulling Added clink config for cmd Removed auto-split on start in nvim Added guifont in nvim Added workaround for shellpipe in nvim
This commit is contained in:
10
config/clink/inputrc
Normal file
10
config/clink/inputrc
Normal file
@@ -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
|
||||||
3
config/clink/starship.lua
Normal file
3
config/clink/starship.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
-- Load starship
|
||||||
|
|
||||||
|
load(io.popen('starship init cmd'):read("*a"))()
|
||||||
@@ -44,6 +44,12 @@ vim.o.completeopt = "preview"
|
|||||||
vim.o.wildmode = "full"
|
vim.o.wildmode = "full"
|
||||||
vim.o.cinoptions = "l1,b-s"
|
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.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 = {
|
vim.opt.errorformat = {
|
||||||
"%f:%l:%c: fatal %trror: %m", -- gcc/clang fatal error
|
"%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_name(bufnr, "scratch")
|
||||||
|
|
||||||
vim.api.nvim_buf_set_text(bufnr, 0, 0, 0, -1, { "-*- Scratch Buffer -*-" })
|
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
|
end
|
||||||
|
|
||||||
local function AlignEq()
|
local function AlignEq()
|
||||||
|
|||||||
36
dots.bat
Normal file
36
dots.bat
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
IF "%1" == "install" (
|
||||||
|
CALL :Install
|
||||||
|
) ELSE (
|
||||||
|
IF "%1" == "pull" (
|
||||||
|
CALL :Pull
|
||||||
|
) ELSE (
|
||||||
|
echo usage: %0 ^<install^|pull^|diff^>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user