sync
This commit is contained in:
parent
6be14cd936
commit
7fd66bce70
11 changed files with 63 additions and 63 deletions
|
@ -171,7 +171,7 @@ local function normalizeTroubleHighlight() -- {{{
|
||||||
-- TroubleCount xxx links to TabLineSel
|
-- TroubleCount xxx links to TabLineSel
|
||||||
-- copyFg('TroubleError', 'DiagnosticError')
|
-- copyFg('TroubleError', 'DiagnosticError')
|
||||||
link('TroubleSignError', 'DiagnosticError')
|
link('TroubleSignError', 'DiagnosticError')
|
||||||
link('TroubleSignWarning', 'DiagnosticSignWarn')
|
link('TroubleSignWarning', 'DiagnosticWarn')
|
||||||
link('TroubleSignHint', 'DiagnosticHint')
|
link('TroubleSignHint', 'DiagnosticHint')
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'TroubleNormal', {})
|
vim.api.nvim_set_hl(0, 'TroubleNormal', {})
|
||||||
|
|
|
@ -28,9 +28,10 @@ local function on_attach(args)
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
local opts = { noremap = true, silent = true, buffer = args.buf }
|
local opts = { noremap = true, silent = true, buffer = args.buf }
|
||||||
|
|
||||||
if client.server_capabilities.definitionProvider then
|
-- use LSP default tagfunc
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
-- if client.server_capabilities.definitionProvider then
|
||||||
end
|
-- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||||
|
-- end
|
||||||
|
|
||||||
if client.server_capabilities.declarationProvider then
|
if client.server_capabilities.declarationProvider then
|
||||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
|
@ -139,6 +140,7 @@ function M.setup()
|
||||||
return u.search_ancestors(startpath, function(path)
|
return u.search_ancestors(startpath, function(path)
|
||||||
return not string.find(path, '/vendor/') and (
|
return not string.find(path, '/vendor/') and (
|
||||||
u.path.exists(u.path.join(path, 'composer.json'))
|
u.path.exists(u.path.join(path, 'composer.json'))
|
||||||
|
or u.path.exists(u.path.join(path, 'sharedLibs'))
|
||||||
or u.path.exists(u.path.join(path, '.git'))
|
or u.path.exists(u.path.join(path, '.git'))
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -158,7 +158,7 @@ function M.setup()
|
||||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||||
-- window like netrw would, regardless of window.position
|
-- window like netrw would, regardless of window.position
|
||||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||||
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
|
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||||
-- instead of relying on nvim autocmd events.
|
-- instead of relying on nvim autocmd events.
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
|
|
|
@ -79,6 +79,7 @@ function M.setup()
|
||||||
}
|
}
|
||||||
use 'nvim-treesitter/playground'
|
use 'nvim-treesitter/playground'
|
||||||
use({ 'yioneko/nvim-yati', requires = 'nvim-treesitter/nvim-treesitter', tag = 'legacy' })
|
use({ 'yioneko/nvim-yati', requires = 'nvim-treesitter/nvim-treesitter', tag = 'legacy' })
|
||||||
|
use({ 'nvim-treesitter/nvim-treesitter-textobjects', requires = 'nvim-treesitter/nvim-treesitter'})
|
||||||
|
|
||||||
use { 'nvim-telescope/telescope.nvim',
|
use { 'nvim-telescope/telescope.nvim',
|
||||||
requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim' },
|
requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim' },
|
||||||
|
|
|
@ -3,6 +3,7 @@ local M = {}
|
||||||
function M.setup()
|
function M.setup()
|
||||||
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
|
||||||
|
sync_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = { 'help' },
|
disable = { 'help' },
|
||||||
|
@ -22,6 +23,55 @@ function M.setup()
|
||||||
-- disable = { "php" },-- php indent SUCKS A LOT
|
-- disable = { "php" },-- php indent SUCKS A LOT
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
|
textobjects = {
|
||||||
|
swap = {
|
||||||
|
enable = true,
|
||||||
|
swap_next = {
|
||||||
|
[' pl'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
[' ph'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
|
||||||
|
-- Automatically jump forward to textobj, similar to targets.vim
|
||||||
|
lookahead = true,
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
|
['af'] = '@function.outer',
|
||||||
|
['if'] = '@function.inner',
|
||||||
|
['ac'] = '@class.outer',
|
||||||
|
-- You can optionally set descriptions to the mappings (used in the desc parameter of
|
||||||
|
-- nvim_buf_set_keymap) which plugins like which-key display
|
||||||
|
['ic'] = { query = '@class.inner', desc = 'Select inner part of a class region' },
|
||||||
|
},
|
||||||
|
-- You can choose the select mode (default is charwise 'v')
|
||||||
|
--
|
||||||
|
-- Can also be a function which gets passed a table with the keys
|
||||||
|
-- * query_string: eg '@function.inner'
|
||||||
|
-- * method: eg 'v' or 'o'
|
||||||
|
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||||
|
-- mapping query_strings to modes.
|
||||||
|
selection_modes = {
|
||||||
|
['@parameter.outer'] = 'v', -- charwise
|
||||||
|
['@function.outer'] = 'V', -- linewise
|
||||||
|
['@class.outer'] = '<c-v>', -- blockwise
|
||||||
|
},
|
||||||
|
-- If you set this to `true` (default is `false`) then any textobject is
|
||||||
|
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||||
|
-- whitespace has priority in order to act similarly to eg the built-in
|
||||||
|
-- `ap`.
|
||||||
|
--
|
||||||
|
-- Can also be a function which gets passed a table with the keys
|
||||||
|
-- * query_string: eg '@function.inner'
|
||||||
|
-- * selection_mode: eg 'v'
|
||||||
|
-- and should return true of false
|
||||||
|
include_surrounding_whitespace = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
|
local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
|
||||||
|
|
|
@ -3,3 +3,4 @@ git https://git.jopixel.cz/dashboard
|
||||||
jira https://jira.jopixel.cz/secure/Dashboard.jspa
|
jira https://jira.jopixel.cz/secure/Dashboard.jspa
|
||||||
support https://support.jopixel.cz/
|
support https://support.jopixel.cz/
|
||||||
admin https://admin.jopixel.com/
|
admin https://admin.jopixel.com/
|
||||||
|
gitlab https://repository.laya.io/
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
alias hosts="sudo vim /etc/hosts"
|
|
||||||
|
|
||||||
alias vi=nvim
|
|
||||||
alias vim=nvim
|
|
||||||
|
|
||||||
alias kid3=kid3-qt
|
|
||||||
alias torr=transmission-cli
|
|
||||||
|
|
||||||
alias grevert="git checkout --"
|
|
||||||
alias gst='git status -s'
|
|
||||||
alias gp='git push'
|
|
||||||
alias gd='git diff'
|
|
||||||
alias gup='git pull --rebase'
|
|
||||||
alias gwch='git log -p --ext-diff'
|
|
||||||
|
|
||||||
alias wine32='WINEARCH=win32 WINEPREFIX=/home/sogun/.wine32 wine'
|
|
||||||
|
|
||||||
alias lg=lazygit
|
|
||||||
|
|
||||||
alias catdb='git --no-pager show HEAD:www/app/config/database.cfg.d/connections.cfg.d/basic.cfg.php'
|
|
||||||
|
|
||||||
alias scur='systemctl --user restart'
|
|
||||||
alias scus='systemctl --user stop'
|
|
||||||
alias scust='systemctl --user status'
|
|
||||||
alias slog='journalctl --user -u'
|
|
||||||
|
|
||||||
alias ls='ls --color=tty --hyperlink=auto'
|
|
||||||
|
|
||||||
alias rg='rg --no-ignore'
|
|
||||||
# vim: ft=zsh
|
|
|
@ -1,27 +0,0 @@
|
||||||
pomerge() {
|
|
||||||
name="$1"
|
|
||||||
lang="${2:-cs_CZ.UTF-8}"
|
|
||||||
git_root="$(git worktree list --porcelain | awk 'NR == 1 {print $2; exit}')"
|
|
||||||
app_po="${git_root}/www/app/translate/gettext/$lang/LC_MESSAGES/$name.po"
|
|
||||||
new_po="${git_root}/www/userdata/locale/${name}_new.po"
|
|
||||||
[[ -d "$(dirname "$app_po")" ]] || mkdir -p "$(dirname "$app_po")"
|
|
||||||
[[ -e "$new_po" ]] || { echo "$new_po does not exist" ; return 1 ;}
|
|
||||||
if ! [[ -e "$app_po" ]]
|
|
||||||
then
|
|
||||||
cp -v "$new_po" "$app_po"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
tmp="$(mktemp)"
|
|
||||||
msgcat --use-first --no-location --no-wrap "$app_po" "$new_po" > "$tmp"
|
|
||||||
mv "$tmp" "$app_po"
|
|
||||||
}
|
|
||||||
|
|
||||||
pocompile() {
|
|
||||||
name="$1"
|
|
||||||
lang="${2:-cs_CZ.UTF-8}"
|
|
||||||
git_root="$(git worktree list --porcelain | awk 'NR == 1 {print $2; exit}')"
|
|
||||||
app_po="${git_root}/www/app/translate/gettext/$lang/LC_MESSAGES/$name.po"
|
|
||||||
[[ -e "$app_po" ]] || { echo "$app_po does not exists"; return 1; }
|
|
||||||
|
|
||||||
msgfmt -o "${app_po%po}mo" "$app_po"
|
|
||||||
}
|
|
|
@ -26,4 +26,6 @@ alias slog='journalctl --user -u'
|
||||||
alias ls='ls --color=tty --hyperlink=auto'
|
alias ls='ls --color=tty --hyperlink=auto'
|
||||||
alias l='ls -lh'
|
alias l='ls -lh'
|
||||||
|
|
||||||
|
alias _=sudo
|
||||||
|
|
||||||
alias rg='rg --no-ignore'
|
alias rg='rg --no-ignore'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
zmodule zsh-users/zsh-syntax-highlighting
|
#zmodule zsh-users/zsh-syntax-highlighting
|
||||||
|
zmodule zdharma-continuum/fast-syntax-highlighting
|
||||||
zmodule input
|
zmodule input
|
||||||
zmodule romkatv/powerlevel10k --use degit
|
zmodule romkatv/powerlevel10k --use degit
|
||||||
zmodule agkozak/zsh-z
|
zmodule agkozak/zsh-z
|
||||||
|
|
Loading…
Add table
Reference in a new issue