1
0
Fork 0

Compare commits

...

6 commits

10 changed files with 229 additions and 64 deletions

View file

@ -131,6 +131,7 @@ dwindle {
# 2 = always bottom/right
force_split = 2
preserve_split = true
permanent_direction_override = true
# special_scale_factor = 0.8f
# split_width_multiplier = 1.0f
# no_gaps_when_only = 0

View file

@ -1359,7 +1359,7 @@ color0 #1d2021
#: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote-
#: control/#rc-custom-auth> for details.
allow_remote_control socket
allow_remote_control yes
#: Allow other programs to control kitty. If you turn this on, other
#: programs can control all aspects of kitty, including sending text

View file

@ -1,2 +1 @@
experimental-features = nix-command flakes
substituters = https://cache.nixos.org https://nix-shell.cachix.org https://php-src-nix.cachix.org

View file

@ -0,0 +1,14 @@
[
(config_expr)
(list_expr)
(config_entry)
(schema_stmt)
(assign_stmt)
] @indent.begin
[
"}"
"]"
")"
] @indent.branch

View file

@ -47,7 +47,7 @@ function M.setup()
local isfname = {}
for _, ch in ipairs(vim.opt.isfname:get()) do
if ch ~= "=" then
if ch ~= '=' then
table.insert(isfname, ch)
end
end
@ -122,17 +122,19 @@ function M.setup()
end,
})
local sev = vim.diagnostic.severity
vim.diagnostic.config({
virtual_text = false
-- virtual_text = {
-- format = function(diag)
-- local s = vim.diagnostic.severity
-- if diag.severity == s.E or diag.severity == s.W then
-- return diag.message
-- end
-- return nil
-- end,
-- },
virtual_text = false,
virtual_lines = { current_line = true },
signs = {
text = {
[sev.ERROR] = '',
[sev.WARN] = '',
[sev.INFO] = '',
[sev.HINT] = '󰌵',
},
},
})
if vim.g.neoray then -- {{{
@ -154,7 +156,7 @@ function M.reset(winids)
winids = api.nvim_tabpage_list_wins(0)
end
if type(winids) == number then
if type(winids) == 'number' then
winids = { winids }
end
@ -165,7 +167,7 @@ function M.reset(winids)
for _, win in pairs(winids) do
local buf = api.nvim_win_get_buf(win)
local ft = api.nvim_get_option_value('filetype', { buf = buf})
local ft = api.nvim_get_option_value('filetype', { buf = buf })
end
end

View file

@ -218,17 +218,6 @@ function M.config()
end,
})
vim.api.nvim_create_autocmd('ColorschemePre', {
group = augr,
pattern = '*',
callback = function()
vim.fn.sign_define('DiagnosticSignError', { text = '', texthl = 'DiagnosticSignError' })
vim.fn.sign_define('DiagnosticSignWarn', { text = '', texthl = 'DiagnosticSignWarn' })
vim.fn.sign_define('DiagnosticSignInfo', { text = '', texthl = 'DiagnosticSignInfo' })
vim.fn.sign_define('DiagnosticSignHint', { text = '󰌵', texthl = 'DiagnosticSignHint' })
end,
})
local term = vim.env.TERM
if (term ~= 'linux' or vim.g.neoray)
then

View file

@ -2,7 +2,15 @@ local server_configs = function()
return {
ansiblels = {},
powershell_es = {},
gopls = {},
gopls = {
settings = {
gopls = {
codelenses = {
test = true,
},
},
},
},
templ = {},
clangd = {},
zls = {},
@ -171,7 +179,7 @@ local function on_attach(args) -- {{{
end
-- null-ls has mostly no hover and therefore trashes manpages for shell
if client.supports_method('textDocument/hover') and client.name ~= 'null-ls' then
if client:supports_method('textDocument/hover') and client.name ~= 'null-ls' then
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
end
@ -370,6 +378,7 @@ local res = {
config = config,
cmd = { 'LspInfo', 'LspLog', 'LspStart' },
dependencies = {
{ 'kcl-lang/kcl.nvim' },
{ 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
{
@ -384,7 +393,8 @@ local res = {
'williamboman/mason-lspconfig.nvim',
lazy = true,
dependencies = { 'williamboman/mason.nvim' },
config = config_mason_lsp,
opts = { automatic_installation = true },
-- config = config_mason_lsp,
},
{
'simrat39/rust-tools.nvim',
@ -407,9 +417,9 @@ local res = {
lazy = true,
config = function()
require('schema-companion').setup({
schemas = {},
schemas = {},
enable_telescope = true,
log_level = vim.log.levels.INFO,
log_level = vim.log.levels.INFO,
matchers = {
require('schema-companion.matchers.kubernetes').setup({ version = 'master' }),
},

View file

@ -77,23 +77,6 @@ return {
},
{ 'dyng/ctrlsf.vim', cmd = 'CtrlSF' },
{
'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
config = function()
local lines = require('lsp_lines')
lines.setup()
vim.diagnostic.config({
virtual_lines = function(_, bufnr)
local ft = vim.api.nvim_get_option_value('filetype', { buf = bufnr })
if ft == 'lazy' then
return false
else
return { only_current_line = true }
end
end,
})
end,
},
{
'andymass/vim-matchup',
@ -103,9 +86,9 @@ return {
end,
},
{ 'fpob/nette.vim', ft = 'nette' },
{ 'ziglang/zig.vim', ft = 'zig' },
{ 'chrisbra/csv.vim', ft = 'csv' },
{ 'fpob/nette.vim', ft = 'nette' },
{ 'ziglang/zig.vim', ft = 'zig' },
{ 'chrisbra/csv.vim', ft = 'csv' },
{ 'NoahTheDuke/vim-just' },
{ 'towolf/vim-helm' },
{ 'grafana/vim-alloy' },
@ -146,7 +129,7 @@ return {
{
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
@ -159,5 +142,5 @@ return {
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}
},
}

View file

@ -12,17 +12,6 @@ local M = {
function M.config()
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
-- }
ts_parsers.just = {
install_info = {
url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo
@ -31,6 +20,14 @@ function M.config()
branch = 'main', -- default branch in case of git repo if different from master
},
}
ts_parsers.kcl = {
install_info = {
url = 'https://github.com/kcl-lang/tree-sitter-kcl', -- local path or git repo
files = { 'src/parser.c', 'src/scanner.c' },
-- optional entries:
branch = 'main', -- default branch in case of git repo if different from master
},
}
require 'nvim-treesitter.configs'.setup {
@ -38,6 +35,7 @@ function M.config()
ignore_install = {},
auto_install = true,
sync_install = false,
modules = {},
refactor = {
highlight_current_scope = { enable = false },
smart_rename = {

View file

@ -0,0 +1,169 @@
(identifier) @variable
( config_entry (identifier) @field (_))
( config_entry (selector_expr (identifier)) @field (_))
; Reset highlighting in string interpolations
(interpolation) @none
(import_stmt
(dotted_name
(identifier) @namespace))
(import_stmt
(dotted_name
(identifier) @namespace)
(identifier) @namespace)
(basic_type) @type
(schema_type
(dotted_name
(identifier) @type))
(schema_type
(dotted_name
(identifier) @namespace
(identifier) @type))
(schema_expr
(identifier) @type)
(protocol_stmt
(identifier) @type)
(rule_stmt
(identifier) @type)
(schema_stmt
(identifier) @type)
(lambda_expr
(typed_parameter (identifier) @parameter))
(lambda_expr
(identifier) @parameter)
(selector_expr
(select_suffix
(identifier) @property))
(comment) @comment
(string) @string
(escape_sequence) @string.escape
(schema_stmt
body: (block
.
(string
(string_content) @string.documentation)))
(decorator
(identifier) @attribute)
(call_expr
function: (identifier) @function)
(call_expr
function: (selector_expr
(select_suffix
(identifier) @function)))
[
(integer)
(float)
] @number
[
(true)
(false)
(none)
(undefined)
] @constant.builtin
[
"all"
"any"
"assert"
"as"
"check"
"elif"
"else"
"filter"
"for"
"if"
"import"
"lambda"
"map"
"mixin"
"protocol"
"rule"
"schema"
"type"
] @keyword
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
(interpolation
"${" @punctuation.special
"}" @punctuation.special)
[
"+"
"-"
"*"
"**"
"/"
"//"
"%"
"<<"
">>"
"&"
"|"
"^"
"<"
">"
"~"
"<="
">="
"=="
"!="
"@"
"and"
"or"
"not"
"in"
"is"
"="
":"
] @operator
; second argument is a regex in all regex functions with at least two arguments
(call_expr
function: (selector_expr
(identifier) @_regex)
arguments: (argument_list
(_)
.
(string
(string_content) @string.regexp))
(#eq? @_regex "regex"))
; first argument is a regex in 'regex.compile' function
(call_expr
.
function: (selector_expr
(identifier) @_regex
(select_suffix
(identifier) @_fn (#eq? @_fn "compile")))
arguments: (argument_list
(string
(string_content) @string.regexp))
(#eq? @_regex "regex"))