mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-06-08 15:10:58 +00:00
@@ -75,7 +75,7 @@ set -g @plugin 'tmux-plugins/tpm'
|
|||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
set -g @continuum-restore 'on'
|
set -g @continuum-restore 'off'
|
||||||
set -g @continuum-save-interval '30'
|
set -g @continuum-save-interval '30'
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ local set = utils.set
|
|||||||
-- Preset
|
-- Preset
|
||||||
-- Prerequisites Must have neovim installed
|
-- Prerequisites Must have neovim installed
|
||||||
if fn.has('nvim') == 0 then
|
if fn.has('nvim') == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Ensure packer installed
|
-- Ensure packer installed
|
||||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
||||||
cmd('packadd packer.nvim')
|
cmd('packadd packer.nvim')
|
||||||
end
|
end
|
||||||
|
|
||||||
-- reopen last position
|
-- reopen last position
|
||||||
@@ -55,7 +55,7 @@ cmd([[ autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textw
|
|||||||
cmd([[ autocmd FileType ruby setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
cmd([[ autocmd FileType ruby setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||||
cmd([[ autocmd FileType less,sass,scss,css setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
cmd([[ autocmd FileType less,sass,scss,css setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||||
cmd(
|
cmd(
|
||||||
[[ autocmd FileType javascript,javascript.jsx,javascriptreact,typescript,typescriptreact setlocal tabstop=2 shiftwidth=2 softtabstop=4 expandtab ]]
|
[[ autocmd FileType javascript,javascript.jsx,javascriptreact,typescript,typescriptreact setlocal tabstop=2 shiftwidth=2 softtabstop=4 expandtab ]]
|
||||||
)
|
)
|
||||||
|
|
||||||
cmd([[iabbrev pdb import pdb; pdb.set_trace()<ESC>]])
|
cmd([[iabbrev pdb import pdb; pdb.set_trace()<ESC>]])
|
||||||
@@ -172,7 +172,7 @@ require('funcs')
|
|||||||
|
|
||||||
-- Neoformat
|
-- Neoformat
|
||||||
if not fn.executable('luafmt') then
|
if not fn.executable('luafmt') then
|
||||||
cmd([[ :!npm install -g lua-fmt]])
|
cmd([[ :!npm install -g lua-fmt]])
|
||||||
end
|
end
|
||||||
|
|
||||||
-- barbar
|
-- barbar
|
||||||
@@ -190,9 +190,16 @@ map('n', '-', '<Plug>(choosewin)', { noremap = false })
|
|||||||
-- end
|
-- end
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>of', ':lua OpenFinder()<CR>', { noremap = true, silent = true })
|
||||||
|
|
||||||
|
function OpenFinder()
|
||||||
|
local current_path = vim.fn.expand('%:p:h')
|
||||||
|
vim.cmd('!open ' .. current_path)
|
||||||
|
end
|
||||||
|
|
||||||
-- Some configurations not able to migrate
|
-- Some configurations not able to migrate
|
||||||
api.nvim_exec(
|
api.nvim_exec(
|
||||||
[[
|
[[
|
||||||
" set nocompatible
|
" set nocompatible
|
||||||
"function! NearestMethodOrFunction() abort
|
"function! NearestMethodOrFunction() abort
|
||||||
" return get(b:, 'vista_nearest_method_or_function', '')
|
" return get(b:, 'vista_nearest_method_or_function', '')
|
||||||
@@ -200,5 +207,5 @@ api.nvim_exec(
|
|||||||
"
|
"
|
||||||
"set statusline+=%{NearestMethodOrFunction()}
|
"set statusline+=%{NearestMethodOrFunction()}
|
||||||
]],
|
]],
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user