dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim: toggle term on F12 and fix map options bug
nushell: do not mess around with PATH/Path
25d56e42da22be766770a1a6415eebb491931b23
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
Browse filesCompare with HEAD
Changed files (4)
neovim/lua/bugabinga/options/ui.lua
Modified130 130 vim.opt.guifont
= 'Cousine,Symbols Nerd Font Mono:h16:#e-subpixelantialias:#h-none' 133 -vim.opt.linespace
= -3 136 133 if vim.g.neovide
then 137 - vim.g.neovide_floating_blur_amount_x
= 12.0 138 - vim.g.neovide_floating_blur_amount_y
= 12.0 140 - vim.g.neovide_fullscreen
= true 141 - vim.g.neovide_remember_window_size
= true 142 - vim.g.neovide_profiler
= false 145 - vim.g.neovide_cursor_vfx_mode
= 'railgun' 147 - vim.g.neovide_cursor_antialiasing
= true 136 + vim.g.neovide_touch_deadzone
= 0.0 138 + vim.g.neovide_touch_drag_timeout
= 0.69 148 139 vim.g.neovide_padding_top
= 0 140 + vim.g.neovide_padding_left
= 8 149 141 vim.g.neovide_padding_bottom
= 0 150 142 vim.g.neovide_padding_right
= 0 151 - vim.g.neovide_padding_left
= 0 152 143 vim.g.neovide_hide_mouse_when_typing
= true 153 - vim.g.neovide_theme
= 'auto' 154 144 vim.g.neovide_refresh_rate_idle
= 5 neovim/lua/bugabinga/terminal.lua
Modified 4 4 local map
= require 'std.map' 5 5 local auto
= require 'std.auto' 8 8 description =
'Open terminal in a split',
9 9 category =
'terminal',
11 11 command =
function ()
12 12 local cwd
= vim.uv.cwd()
14 14 local shell
= vim.opt.shell:get()
15 - local open_term_cmd
= string.
format(
'split term://%s//%s', cwd, shell )
16 + local relative_cwd
= vim.fn.fnamemodify( cwd,
':~' )
17 + local term_name
= string.
format(
'term://%s//%s', relative_cwd, shell )
18 + local buffers
= vim.api.nvim_list_bufs()
19 + local existing_term
= vim.iter( buffers ):map(
function ( buffer_number )
20 + return { buffer_number, vim.api.nvim_buf_get_name( buffer_number ), }
21 + end ):filter(
function ( buffer )
22 + return string.
find( buffer[
2], relative_cwd,
1,
true )
24 + if existing_term
then 25 + term_name
= existing_term[
2]
27 + local open_term_cmd
= string.
format(
'split %s', term_name )
16 28 vim.cmd( open_term_cmd )
20 32 local terminal_settings = function ()
22 - description =
'Quit insert mode via <esc>',
34 + description =
'Quit terminal mode via <esc>',
23 35 category =
'terminal',
26 38 command =
[[ <C-\><C-n> ]],
41 + map.normal.terminal {
42 + description =
'Close.',
43 + category =
'terminal',
46 + command =
[[<cmd>close<cr>]],
29 49 vim.opt_local.spell
= false 30 50 vim.cmd.startinsert()
neovim/lua/std/map.lua
Modified49 49 local options
= vim.tbl_extend(
"keep", map.options, {
51 51 desc = map.description,
52 + buffer = map.buffer,
54 56 if vim.tbl_isempty(self.modes)
then 55 57 self.modes[
1]
= available_modes.normal_visual_select_operator_pending
58 62 if type(keys)
== "table" then 59 63 for _, key
in ipairs(keys)
do 60 64 vim.keymap.set(self.modes, key, command, options)
46 46 (
$nu.config-path | path dirname | path join
'completions')
52 - $env.Path = (
$env.Path | prepend
'' )
54 - $env.CARGO_HOME = (
'~/.cargo' | path expand )
55 - $env.PATH = (
$env.PATH | prepend (
$env.CARGO_HOME | path join
'bin') )
56 - $env.PATH = (
$env.PATH | prepend (
'~/.local/bin'| path expand ) )