Skip to content

Commit

Permalink
feat(extras): Add a repro.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptomilk committed Jan 11, 2024
1 parent de976dc commit bfe6875
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
9 changes: 9 additions & 0 deletions extras/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Extras

## Reproducer

Download the [reproducer](https://raw.githubusercontent.com/nvim-focus/focus.nvim/master/extras/repro.lua) and start it with:

nvim -u repro.lua

Once done zip the `repro.lua` and `.repro` directory and upload it.
62 changes: 62 additions & 0 deletions extras/repro.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
-- DO NOT change the paths
local root = vim.fn.fnamemodify('./.repro', ':p')

-- set stdpaths to use .repro
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end

-- bootstrap lazy
local lazypath = root .. '/plugins/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim',
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
'nvim-focus/focus.nvim',
-- add any other plugins here
}
require('lazy').setup(plugins, {
root = root .. '/plugins',
})

require("focus").setup({
enable = true, -- Enable module
commands = true, -- Create Focus commands
autoresize = {
enable = true, -- Enable or disable auto-resizing of splits
width = 0, -- Force width for the focused window
height = 0, -- Force height for the focused window
minwidth = 0, -- Force minimum width for the unfocused window
minheight = 0, -- Force minimum height for the unfocused window
height_quickfix = 10, -- Set the height of quickfix panel
},
split = {
bufnew = false, -- Create blank buffer for new split windows
tmux = false, -- Create tmux splits instead of neovim splits
},
ui = {
number = false, -- Display line numbers in the focussed window only
relativenumber = false, -- Display relative line numbers in the focussed window only
hybridnumber = false, -- Display hybrid line numbers in the focussed window only
absolutenumber_unfocussed = false, -- Preserve absolute numbers in the unfocussed windows

cursorline = true, -- Display a cursorline in the focussed window only
cursorcolumn = false, -- Display cursorcolumn in the focussed window only
colorcolumn = {
enable = false, -- Display colorcolumn in the foccused window only
list = '+1', -- Set the comma-saperated list for the colorcolumn
},
signcolumn = true, -- Display signcolumn in the focussed window only
winhighlight = false, -- Auto highlighting for focussed/unfocussed windows
}
})
-- add anything else here

0 comments on commit bfe6875

Please sign in to comment.