sync
This commit is contained in:
parent
8158b8b199
commit
120fad6894
5 changed files with 122 additions and 31 deletions
|
@ -4,6 +4,7 @@ set -e
|
|||
|
||||
doms=(
|
||||
'localhost'
|
||||
'local3000.localhost'
|
||||
'djinn1.localhost'
|
||||
'*.gdpr.localhost'
|
||||
'*.up123.localhost'
|
||||
|
@ -28,6 +29,7 @@ doms=(
|
|||
'*.katalogy.localhost'
|
||||
'*.vizit-core.localhost'
|
||||
'*.vizit.localhost'
|
||||
'*.vizit-virtualni-recepce.localhost'
|
||||
'*.vizitpresentation.localhost'
|
||||
'*.booking-core.localhost'
|
||||
'*.nicerice.localhost'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[storage]
|
||||
driver = "overlay"
|
||||
runroot = "/run/user/1000"
|
||||
graphroot = "{{.chezmoi.homeDir}}/.local/share/containers/storage"
|
||||
runroot = "/run/user/{{ .chezmoi.uid }}/containers/"
|
||||
graphroot = "{{ .chezmoi.homeDir }}/.local/share/containers/storage"
|
||||
# [storage.options]
|
||||
# mount_program = "/usr/bin/fuse-overlayfs"
|
||||
|
||||
|
|
|
@ -53,11 +53,12 @@ http {
|
|||
# proxy_intercept_errors on;
|
||||
# fastcgi_intercept_errors on;
|
||||
|
||||
add_header "Access-Control-Allow-Origin" "*";
|
||||
add_header "Access-Control-Allow-Origin" $http_origin;
|
||||
add_header "Access-Control-Allow-Credentials" true;
|
||||
access_log off;
|
||||
|
||||
client_body_temp_path /run/user/{{ .chezmoi.uid }}/nginx/body;
|
||||
fastcgi_temp_path /run/user/{{ .chezmoi.uid }}/nginx/fastcgi;
|
||||
client_body_temp_path /run/user/{{ .chezmoi.gid }}/nginx/body;
|
||||
fastcgi_temp_path /run/user/{{ .chezmoi.gid }}/nginx/fastcgi;
|
||||
|
||||
|
||||
server {
|
||||
|
@ -344,6 +345,31 @@ http {
|
|||
}
|
||||
}
|
||||
|
||||
server {
|
||||
#server_name _;
|
||||
server_name local3000.localhost;
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
ssl_certificate {{ .chezmoi.homeDir }}/.config/nginx/ssl/localhost.crt;
|
||||
ssl_certificate_key {{ .chezmoi.homeDir }}/.config/nginx/ssl/localhost.key;
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_hide_header "Access-Control-Allow-Origin";
|
||||
proxy_hide_header "Access-Control-Allow-Credentials";
|
||||
proxy_pass https://recepce.vizit-virtualni-recepce.localhost;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
#server_name _;
|
||||
server_name gin.localhost;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
local 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
|
||||
|
||||
|
||||
|
@ -11,7 +12,6 @@ require('packer').startup(function(use)
|
|||
use 'wbthomason/packer.nvim'
|
||||
|
||||
use 'neovim/nvim-lspconfig'
|
||||
-- use 'glepnir/lspsaga.nvim'
|
||||
use { 'hrsh7th/nvim-cmp', requires = { 'neovim/nvim-lspconfig' } }
|
||||
use { 'hrsh7th/cmp-nvim-lsp', requires = { 'hrsh7th/nvim-cmp' } }
|
||||
use { 'hrsh7th/cmp-buffer', requires = { 'hrsh7th/nvim-cmp' } }
|
||||
|
@ -22,7 +22,10 @@ require('packer').startup(function(use)
|
|||
|
||||
use { 'hrsh7th/cmp-vsnip', requires = { 'hrsh7th/nvim-cmp', 'hrsh7th/vim-vsnip' } }
|
||||
use { 'onsails/lspkind.nvim' }
|
||||
use { 'simrat39/symbols-outline.nvim', cmd = 'SymbolsOutline' }
|
||||
use 'ray-x/lsp_signature.nvim'
|
||||
use { 'RishabhRD/nvim-lsputils', requires = { 'RishabhRD/popfix' } }
|
||||
use { 'weilbith/nvim-code-action-menu', cmd='CodeActionMenu' }
|
||||
-- use { 'simrat39/symbols-outline.nvim', cmd = 'SymbolsOutline' }
|
||||
|
||||
use { 'jose-elias-alvarez/null-ls.nvim', requires = { "nvim-lua/plenary.nvim" } }
|
||||
|
||||
|
@ -136,14 +139,22 @@ vim.cmd([[
|
|||
--- OPTIONS }}}
|
||||
|
||||
--- LSP {{{
|
||||
-- local saga = require('lspsaga').init_lsp_saga()
|
||||
|
||||
--[[ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client.server_capabilities.hoverProvider then
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf })
|
||||
end
|
||||
end,
|
||||
})
|
||||
]]
|
||||
local nvim_lsp = require('lspconfig')
|
||||
local on_attach = function(_, bufnr)
|
||||
local on_attach = function(client, bufnr)
|
||||
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
|
||||
|
||||
require "lsp_signature".on_attach()
|
||||
-- require'completion'.on_attach()
|
||||
|
||||
-- Mappings.
|
||||
|
@ -159,27 +170,38 @@ local on_attach = function(_, bufnr)
|
|||
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>CodeActionMenu<CR>', opts)
|
||||
buf_set_keymap('v', '<space>ca', '<cmd>lua vim.lsp.buf.range_code_action()<CR>', opts)
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
|
||||
buf_set_keymap('n', "<space>F", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
buf_set_keymap('v', "<space>gf", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
|
||||
buf_set_keymap('n', '<space>F', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
buf_set_keymap('v', '<space>F', '<cmd>lua vim.lsp.buf.range_formatting()<CR>', opts)
|
||||
end
|
||||
|
||||
-- Use a loop to conveniently both setup defined servers
|
||||
-- and map buffer local keybindings when the language server attaches
|
||||
local servers = { 'phpactor', 'gopls', 'clangd', 'zls', 'hls', 'tsserver', 'sumneko_lua' }
|
||||
local servers = { 'phpactor', 'gopls', 'clangd', 'zls', 'hls', 'tsserver', 'sumneko_lua', 'perlls' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
root_dir = require('lspconfig.util').root_pattern('composer.json')
|
||||
}
|
||||
end
|
||||
|
||||
require 'lspconfig'.phpactor.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
|
||||
root_dir = function(path)
|
||||
local u = require('lspconfig.util')
|
||||
return u.search_ancestors(path, function(p)
|
||||
return not string.find(p, 'vendor') and u.path.exists(u.path.join(p, 'composer.json'))
|
||||
end)
|
||||
end
|
||||
}
|
||||
|
||||
require 'lspconfig'.omnisharp.setup {
|
||||
cmd = { '/usr/bin/omnisharp', '--languageserver', '--hostPID', tostring(pid) },
|
||||
on_attach = on_attach,
|
||||
|
@ -187,7 +209,7 @@ require 'lspconfig'.omnisharp.setup {
|
|||
}
|
||||
|
||||
require 'lspconfig'.powershell_es.setup {
|
||||
bundle_path = '/home/sogun/devel/PowerShellEditorServices',
|
||||
bundle_path = '/home/vladimir/devel/PowerShellEditorServices/module',
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
}
|
||||
|
||||
|
@ -205,7 +227,7 @@ cmp.setup({
|
|||
{ name = 'nvim_lua' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
-- { name = 'nvim_lsp_signature_help' },
|
||||
},
|
||||
formatting = {
|
||||
format = require 'lspkind'.cmp_format({
|
||||
|
@ -366,6 +388,19 @@ require 'nvim-treesitter.configs'.setup {
|
|||
},
|
||||
}
|
||||
|
||||
local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
|
||||
ts_parsers.xml = {
|
||||
install_info = {
|
||||
url = "https://github.com/dorgnarg/tree-sitter-xml", -- local path or git repo
|
||||
files = {"src/parser.c"},
|
||||
-- optional entries:
|
||||
branch = "main", -- default branch in case of git repo if different from master
|
||||
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
|
||||
requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
|
||||
},
|
||||
filetype = "xml", -- if filetype does not match the parser name
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap('x', 'iu', ':lua require"treesitter-unit".select()<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('x', 'au', ':lua require"treesitter-unit".select(true)<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('o', 'iu', ':<c-u>lua require"treesitter-unit".select()<CR>', { noremap = true })
|
||||
|
@ -426,22 +461,50 @@ vim.g.rooter_manual_only = 1
|
|||
-- }}}
|
||||
|
||||
-- null-ls {{{
|
||||
nls = require "null-ls"
|
||||
local nls = require "null-ls"
|
||||
|
||||
nls.setup({
|
||||
on_attach = on_attach,
|
||||
debug = true,
|
||||
sources = {
|
||||
nls.builtins.formatting.xmllint,
|
||||
nls.builtins.formatting.jq,
|
||||
nls.builtins.diagnostics.sqlfluff,
|
||||
nls.builtins.diagnostics.phpstan.with({
|
||||
cwd = function(params)
|
||||
-- falls back to root if return value is nil
|
||||
return params.root:match("jopixel") and "www";
|
||||
return params.root:match("jopixel") and not params.root:match("repo") and "www";
|
||||
end
|
||||
}),
|
||||
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":"single_space",
|
||||
"operators": {
|
||||
"=>":"align_single_space_minimal",
|
||||
"=":"align_single_space_minimal",
|
||||
"??=":"align_single_space_minimal",
|
||||
"^=":"align_single_space_minimal",
|
||||
"|=":"align_single_space_minimal",
|
||||
"+=":"align_single_space_minimal",
|
||||
"%=":"align_single_space_minimal",
|
||||
"&=":"align_single_space_minimal",
|
||||
"**=":"align_single_space_minimal",
|
||||
"*=":"align_single_space_minimal",
|
||||
"-=":"align_single_space_minimal",
|
||||
".=":"align_single_space_minimal",
|
||||
"/=":"align_single_space_minimal",
|
||||
"<<=":"align_single_space_minimal",
|
||||
"<=":"align_single_space_minimal",
|
||||
">=":"align_single_space_minimal",
|
||||
">>=":"align_single_space_minimal"
|
||||
}
|
||||
},
|
||||
"fully_qualified_strict_types":false
|
||||
} ]] }
|
||||
}),
|
||||
nls.builtins.diagnostics.shellcheck,
|
||||
nls.builtins.formatting.eslint,
|
||||
|
@ -479,16 +542,15 @@ vim.cmd 'highlight link TSVariableBuiltin Identifier'
|
|||
-- {{{ LAYA
|
||||
vim.cmd [[
|
||||
augroup layaAbbrevs
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> T $this->obtainer()->translator()->t();<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> TR $this->obtainer()->translator()->t();<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> TI $this->obtainer()->translator()->t()<Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> LOG $this->obtainer()->logger()->log();<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> DEBUG $this->obtainer()->logger()->log('debug', 'debug',);<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> DBG $this->obtainer()->logger()->log('debug', 'debug',);<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> PROD $this->producer()
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> VIEW \laya\view\view
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> FORM \layalib\view\form\form
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> FILE $this->producer()->file()<Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> LINK $this->producer()->link($this, '')<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> NOTIF $this->obtainer()->notifications()
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> NW $this->obtainer()->notifications()->warning();<Left><Left>
|
||||
autocmd BufRead,BufNewFile ~/jopixel/**/*.php iabbrev <buffer> NS $this->obtainer()->notifications()->success();<Left><Left>
|
||||
augroup END
|
||||
]]
|
||||
-- }}} LAYA
|
||||
|
|
|
@ -159,6 +159,11 @@ regex/\.t(ar\.zst|zst)$
|
|||
shell/.tar.F
|
||||
# Open=%cd %p/utar://
|
||||
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.F
|
||||
#
|
||||
# zip
|
||||
shell/i/.zip
|
||||
Open=%cd %p/uzip://
|
||||
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
|
||||
|
||||
# .qpr/.qpk - QNX Neutrino package installer files
|
||||
regex/\.qp[rk]$
|
||||
|
@ -586,7 +591,7 @@ type/^PostScript
|
|||
|
||||
# PDF
|
||||
type/^PDF
|
||||
Open=/usr/bin/mupdf %f &>/dev/null &
|
||||
Open=/usr/bin/mupdf %f
|
||||
View=/usr/bin/mupdf %f
|
||||
|
||||
# html
|
||||
|
@ -741,10 +746,6 @@ shell/i/.arc
|
|||
Extract=arc x %f '*'
|
||||
Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
|
||||
|
||||
# zip
|
||||
shell/i/.zip
|
||||
Open=%cd %p/uzip://
|
||||
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
|
||||
|
||||
# zip
|
||||
type/i/^zip\ archive
|
||||
|
|
Loading…
Add table
Reference in a new issue