..
This commit is contained in:
parent
99dbd7eafd
commit
50872ffae2
4 changed files with 143 additions and 114 deletions
|
@ -63,7 +63,7 @@ do
|
||||||
|
|
||||||
update network "$(ip -br addr show dev eth0 | awk '{ print $2"\t"$3 }')"
|
update network "$(ip -br addr show dev eth0 | awk '{ print $2"\t"$3 }')"
|
||||||
|
|
||||||
update wifi "$(iwctl station wlan0 show |grep 'Connected network' | sed 's/ */ /g' | cut -d ' ' -f 4-)"
|
which iwctl &>/dev/null && update wifi "$(iwctl station wlan0 show |grep 'Connected network' | sed 's/ */ /g' | cut -d ' ' -f 4-)"
|
||||||
|
|
||||||
#if [ -e /run/user/1000/cmus-socket ]
|
#if [ -e /run/user/1000/cmus-socket ]
|
||||||
#then
|
#then
|
||||||
|
|
|
@ -100,6 +100,7 @@ hc --idle | {
|
||||||
|
|
||||||
### All drawing happens here
|
### All drawing happens here
|
||||||
# echo -n "%{T5}" # set font
|
# echo -n "%{T5}" # set font
|
||||||
|
date="$(printf ' %%{F#efefef}%(%H:%M%)T{F#909090}, %(%Y-%m)T-%%{F#efefef}%(%d)T')"
|
||||||
for m in "${!monitors[@]}" ; do
|
for m in "${!monitors[@]}" ; do
|
||||||
monitor=${monitors[$m]}
|
monitor=${monitors[$m]}
|
||||||
|
|
||||||
|
@ -143,7 +144,7 @@ hc --idle | {
|
||||||
;;
|
;;
|
||||||
date)
|
date)
|
||||||
#echo "resetting date" >&2
|
#echo "resetting date" >&2
|
||||||
date="${cmd[*]:1}"
|
# date="${cmd[*]:1}"
|
||||||
;;
|
;;
|
||||||
quit_panel)
|
quit_panel)
|
||||||
exit
|
exit
|
||||||
|
@ -162,7 +163,9 @@ hc --idle | {
|
||||||
# declare -A player_status
|
# declare -A player_status
|
||||||
if [[ "${cmd[1]}" = cmus ]]
|
if [[ "${cmd[1]}" = cmus ]]
|
||||||
then
|
then
|
||||||
play_line=" ${cmd[3]:0:20}/${cmd[4]:0:20}- ${cmd[5]:0:20}"
|
play_line=" ${cmd[3]:0:20}/${cmd[4]:0:20}"
|
||||||
|
[[ -n ${cmd[5]} ]] && play_line="$play_line: ${cmd[5]:0:20}"
|
||||||
|
|
||||||
play_sym=
|
play_sym=
|
||||||
case "${cmd[2]}" in
|
case "${cmd[2]}" in
|
||||||
off|Stopped)
|
off|Stopped)
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
local fn = vim.fn
|
local fn = vim.fn
|
||||||
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
|
||||||
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
local packer_bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require('packer').startup(function(use)
|
require('packer').startup(function(use)
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
@ -16,12 +18,21 @@ require('packer').startup(function(use)
|
||||||
use { 'hrsh7th/cmp-path', requires = { 'hrsh7th/nvim-cmp' } }
|
use { 'hrsh7th/cmp-path', requires = { 'hrsh7th/nvim-cmp' } }
|
||||||
use { 'hrsh7th/cmp-nvim-lua', requires = { 'hrsh7th/nvim-cmp' } }
|
use { 'hrsh7th/cmp-nvim-lua', requires = { 'hrsh7th/nvim-cmp' } }
|
||||||
use 'hrsh7th/vim-vsnip'
|
use 'hrsh7th/vim-vsnip'
|
||||||
|
use 'hrsh7th/cmp-nvim-lsp-signature-help'
|
||||||
|
|
||||||
use { 'hrsh7th/cmp-vsnip', requires = { 'hrsh7th/nvim-cmp', 'hrsh7th/vim-vsnip' } }
|
use { 'hrsh7th/cmp-vsnip', requires = { 'hrsh7th/nvim-cmp', 'hrsh7th/vim-vsnip' } }
|
||||||
use { 'onsails/lspkind.nvim' }
|
use { 'onsails/lspkind.nvim' }
|
||||||
use 'simrat39/symbols-outline.nvim'
|
use { 'simrat39/symbols-outline.nvim', cmd = 'SymbolsOutline' }
|
||||||
|
|
||||||
use { 'jose-elias-alvarez/null-ls.nvim', requires = { "nvim-lua/plenary.nvim" } }
|
use { 'jose-elias-alvarez/null-ls.nvim', requires = { "nvim-lua/plenary.nvim" } }
|
||||||
|
|
||||||
|
use {
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
requires = "kyazdani42/nvim-web-devicons",
|
||||||
|
cmd = 'TroubleToggle',
|
||||||
|
keys = { 'n', '<space>t <Cmd>TroubleToggle<CR>' }
|
||||||
|
-- config = require('trouble').setup()
|
||||||
|
}
|
||||||
|
|
||||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||||
use 'nvim-treesitter/playground'
|
use 'nvim-treesitter/playground'
|
||||||
|
@ -29,12 +40,17 @@ require('packer').startup(function(use)
|
||||||
use({ "yioneko/nvim-yati", requires = "nvim-treesitter/nvim-treesitter" })
|
use({ "yioneko/nvim-yati", requires = "nvim-treesitter/nvim-treesitter" })
|
||||||
|
|
||||||
use { 'nvim-telescope/telescope.nvim', requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim' } }
|
use { 'nvim-telescope/telescope.nvim', requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim' } }
|
||||||
|
use { 'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||||
|
}
|
||||||
|
|
||||||
-- use {"ellisonleao/gruvbox.nvim", requires = {"rktjmp/lush.nvim"}}
|
-- use {"ellisonleao/gruvbox.nvim", requires = {"rktjmp/lush.nvim"}}
|
||||||
use 'morhetz/gruvbox'
|
use 'morhetz/gruvbox'
|
||||||
-- use 'lifepillar/vim-solarized8'
|
-- use 'lifepillar/vim-solarized8'
|
||||||
|
|
||||||
use {'chrisbra/Colorizer', cmd='ColorToggle'}
|
use { 'chrisbra/Colorizer', cmd = 'ColorToggle', keys = { 'n', '<space>c <Cmd>ColorToggle<CR>' } }
|
||||||
|
|
||||||
|
-- #aaaaaa
|
||||||
|
|
||||||
use { 'kdheepak/lazygit.nvim', keys = { 'n', '<space>g <Cmd>LazyGit<CR>' }, cmd = 'LazyGit' }
|
use { 'kdheepak/lazygit.nvim', keys = { 'n', '<space>g <Cmd>LazyGit<CR>' }, cmd = 'LazyGit' }
|
||||||
use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' } }
|
use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' } }
|
||||||
|
@ -53,7 +69,14 @@ require('packer').startup(function(use)
|
||||||
use 'editorconfig/editorconfig-vim'
|
use 'editorconfig/editorconfig-vim'
|
||||||
|
|
||||||
use { 'scrooloose/nerdtree', disable = true }
|
use { 'scrooloose/nerdtree', disable = true }
|
||||||
use { 'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons' }
|
use { 'kyazdani42/nvim-tree.lua',
|
||||||
|
requires = 'kyazdani42/nvim-web-devicons',
|
||||||
|
config = 'require"nvim-tree".setup()',
|
||||||
|
cmd = { 'NvimTreeToggle', 'NvimTreeFindFile' },
|
||||||
|
keys = {
|
||||||
|
{ 'n', '<F3> <Cmd>NvimTreeToggle<CR>' },
|
||||||
|
{ 'n', '<F4> <Cmd>NvimTreeFindFile<CR>' },
|
||||||
|
} }
|
||||||
|
|
||||||
use { 'vim-vdebug/vdebug', ft = php }
|
use { 'vim-vdebug/vdebug', ft = php }
|
||||||
|
|
||||||
|
@ -62,14 +85,10 @@ require('packer').startup(function(use)
|
||||||
use { 'fpob/nette.vim', ft = nette }
|
use { 'fpob/nette.vim', ft = nette }
|
||||||
|
|
||||||
use { 'ziglang/zig.vim', ft = 'zig' }
|
use { 'ziglang/zig.vim', ft = 'zig' }
|
||||||
|
use { 'folke/lua-dev.nvim' }
|
||||||
|
|
||||||
use {
|
use {'AndrewRadev/tagalong.vim'}
|
||||||
'folke/trouble.nvim',
|
use {'andymass/vim-matchup'}
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
|
||||||
cmd = 'TroubleToggle',
|
|
||||||
keys = { 'n', '<space>t <Cmd>TroubleToggle<CR>'}
|
|
||||||
-- config = require('trouble').setup()
|
|
||||||
}
|
|
||||||
|
|
||||||
if packer_bootstrap then
|
if packer_bootstrap then
|
||||||
require('packer').sync()
|
require('packer').sync()
|
||||||
|
@ -129,6 +148,7 @@ augroup END
|
||||||
local nvim_lsp = require('lspconfig')
|
local nvim_lsp = require('lspconfig')
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||||
|
|
||||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||||
|
|
||||||
-- require'completion'.on_attach()
|
-- require'completion'.on_attach()
|
||||||
|
@ -158,7 +178,7 @@ end
|
||||||
|
|
||||||
-- Use a loop to conveniently both setup defined servers
|
-- Use a loop to conveniently both setup defined servers
|
||||||
-- and map buffer local keybindings when the language server attaches
|
-- and map buffer local keybindings when the language server attaches
|
||||||
local servers = { 'phpactor', 'gopls', 'clangd', 'zls', 'hls' }
|
local servers = { 'phpactor', 'gopls', 'clangd', 'zls', 'hls', 'tsserver', 'sumneko_lua' }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
@ -191,6 +211,7 @@ cmp.setup({
|
||||||
{ name = 'nvim_lua' },
|
{ name = 'nvim_lua' },
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = require 'lspkind'.cmp_format({
|
format = require 'lspkind'.cmp_format({
|
||||||
|
@ -272,11 +293,9 @@ let g:nvim_tree_show_icons = {
|
||||||
\ 'folder_arrows': 0,
|
\ 'folder_arrows': 0,
|
||||||
\ }
|
\ }
|
||||||
]])
|
]])
|
||||||
require'nvim-tree'.setup {
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<F3>', [[<Cmd>NvimTreeToggle<CR>]], { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap('n', '<F3>', '<Cmd>NvimTreeToggle<CR>', { noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap('n', '<F4>', [[<Cmd>NvimTreeFindFile<CR>]], { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap('n', '<F4>', '<Cmd>NvimTreeFindFile<CR>', { noremap = true, silent = true })
|
||||||
|
|
||||||
-- }}} NvimTree
|
-- }}} NvimTree
|
||||||
|
|
||||||
|
@ -317,6 +336,8 @@ n = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require('telescope').load_extension('fzf')
|
||||||
|
|
||||||
--[[ local telescope_ag = vim.api.nvim_create_augroup('Telescope')
|
--[[ local telescope_ag = vim.api.nvim_create_augroup('Telescope')
|
||||||
nvim.nvim_create_autocmd('FileType', { pattern='TelescopePrompt', command = nvim.nvim_buf_set_keymap('n', '' ]]
|
nvim.nvim_create_autocmd('FileType', { pattern='TelescopePrompt', command = nvim.nvim_buf_set_keymap('n', '' ]]
|
||||||
vim.cmd 'augroup Telescope'
|
vim.cmd 'augroup Telescope'
|
||||||
|
@ -334,7 +355,7 @@ vim.cmd 'augroup END'
|
||||||
require 'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
ensure_installed = 'all', -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
ensure_installed = 'all', -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||||
highlight = { enable = true, },
|
highlight = { enable = true, },
|
||||||
playground = { enable = false, },
|
playground = { enable = true, },
|
||||||
yati = { enable = true, },
|
yati = { enable = true, },
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -428,7 +449,11 @@ nls.setup({
|
||||||
nls.builtins.formatting.phpcsfixer.with({
|
nls.builtins.formatting.phpcsfixer.with({
|
||||||
extra_args = { "--rules", '{ "@Symfony":true, "nullable_type_declaration_for_default_null_value":true, "array_syntax":{"syntax":"short"}, "binary_operator_spaces":{"default":"align_single_space_minimal"}, "fully_qualified_strict_types":false }' }
|
extra_args = { "--rules", '{ "@Symfony":true, "nullable_type_declaration_for_default_null_value":true, "array_syntax":{"syntax":"short"}, "binary_operator_spaces":{"default":"align_single_space_minimal"}, "fully_qualified_strict_types":false }' }
|
||||||
}),
|
}),
|
||||||
nls.builtins.diagnostics.shellcheck
|
nls.builtins.diagnostics.shellcheck,
|
||||||
|
nls.builtins.formatting.eslint,
|
||||||
|
-- nls.builtins.diagnostics.eslint,
|
||||||
|
nls.builtins.code_actions.eslint,
|
||||||
|
nls.builtins.diagnostics.yamllint,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
side-by-side = true
|
side-by-side = true
|
||||||
;file-decoration-style = none
|
;file-decoration-style = none
|
||||||
file-style = normal
|
file-style = normal
|
||||||
syntax-theme = gruvbox
|
syntax-theme = gruvbox-dark
|
||||||
|
hyperlinks = true
|
||||||
|
|
||||||
[interactive]
|
[interactive]
|
||||||
diffFilter = delta --color-only
|
diffFilter = delta --color-only
|
||||||
|
|
Loading…
Add table
Reference in a new issue