Compare commits
6 commits
28293d40e4
...
db9624783a
Author | SHA1 | Date | |
---|---|---|---|
db9624783a | |||
2d102dadc5 | |||
e6f4dced59 | |||
49303ddc19 | |||
5c5dbeb983 | |||
0e70e87a65 |
10 changed files with 229 additions and 64 deletions
|
@ -131,6 +131,7 @@ dwindle {
|
||||||
# 2 = always bottom/right
|
# 2 = always bottom/right
|
||||||
force_split = 2
|
force_split = 2
|
||||||
preserve_split = true
|
preserve_split = true
|
||||||
|
permanent_direction_override = true
|
||||||
# special_scale_factor = 0.8f
|
# special_scale_factor = 0.8f
|
||||||
# split_width_multiplier = 1.0f
|
# split_width_multiplier = 1.0f
|
||||||
# no_gaps_when_only = 0
|
# no_gaps_when_only = 0
|
||||||
|
|
|
@ -1359,7 +1359,7 @@ color0 #1d2021
|
||||||
#: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote-
|
#: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote-
|
||||||
#: control/#rc-custom-auth> for details.
|
#: 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
|
#: Allow other programs to control kitty. If you turn this on, other
|
||||||
#: programs can control all aspects of kitty, including sending text
|
#: programs can control all aspects of kitty, including sending text
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
substituters = https://cache.nixos.org https://nix-shell.cachix.org https://php-src-nix.cachix.org
|
|
||||||
|
|
14
dot_config/nvim/after/queries/kcl/indents.scm
Normal file
14
dot_config/nvim/after/queries/kcl/indents.scm
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[
|
||||||
|
(config_expr)
|
||||||
|
(list_expr)
|
||||||
|
(config_entry)
|
||||||
|
(schema_stmt)
|
||||||
|
(assign_stmt)
|
||||||
|
] @indent.begin
|
||||||
|
|
||||||
|
[
|
||||||
|
"}"
|
||||||
|
"]"
|
||||||
|
")"
|
||||||
|
] @indent.branch
|
||||||
|
|
|
@ -47,7 +47,7 @@ function M.setup()
|
||||||
|
|
||||||
local isfname = {}
|
local isfname = {}
|
||||||
for _, ch in ipairs(vim.opt.isfname:get()) do
|
for _, ch in ipairs(vim.opt.isfname:get()) do
|
||||||
if ch ~= "=" then
|
if ch ~= '=' then
|
||||||
table.insert(isfname, ch)
|
table.insert(isfname, ch)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -122,17 +122,19 @@ function M.setup()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local sev = vim.diagnostic.severity
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false
|
virtual_text = false,
|
||||||
-- virtual_text = {
|
virtual_lines = { current_line = true },
|
||||||
-- format = function(diag)
|
|
||||||
-- local s = vim.diagnostic.severity
|
signs = {
|
||||||
-- if diag.severity == s.E or diag.severity == s.W then
|
text = {
|
||||||
-- return diag.message
|
[sev.ERROR] = '',
|
||||||
-- end
|
[sev.WARN] = '',
|
||||||
-- return nil
|
[sev.INFO] = '',
|
||||||
-- end,
|
[sev.HINT] = '',
|
||||||
-- },
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if vim.g.neoray then -- {{{
|
if vim.g.neoray then -- {{{
|
||||||
|
@ -154,7 +156,7 @@ function M.reset(winids)
|
||||||
winids = api.nvim_tabpage_list_wins(0)
|
winids = api.nvim_tabpage_list_wins(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(winids) == number then
|
if type(winids) == 'number' then
|
||||||
winids = { winids }
|
winids = { winids }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -165,7 +167,7 @@ function M.reset(winids)
|
||||||
|
|
||||||
for _, win in pairs(winids) do
|
for _, win in pairs(winids) do
|
||||||
local buf = api.nvim_win_get_buf(win)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -218,17 +218,6 @@ function M.config()
|
||||||
end,
|
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
|
local term = vim.env.TERM
|
||||||
if (term ~= 'linux' or vim.g.neoray)
|
if (term ~= 'linux' or vim.g.neoray)
|
||||||
then
|
then
|
||||||
|
|
|
@ -2,7 +2,15 @@ local server_configs = function()
|
||||||
return {
|
return {
|
||||||
ansiblels = {},
|
ansiblels = {},
|
||||||
powershell_es = {},
|
powershell_es = {},
|
||||||
gopls = {},
|
gopls = {
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
codelenses = {
|
||||||
|
test = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
templ = {},
|
templ = {},
|
||||||
clangd = {},
|
clangd = {},
|
||||||
zls = {},
|
zls = {},
|
||||||
|
@ -171,7 +179,7 @@ local function on_attach(args) -- {{{
|
||||||
end
|
end
|
||||||
|
|
||||||
-- null-ls has mostly no hover and therefore trashes manpages for shell
|
-- 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'))
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -370,6 +378,7 @@ local res = {
|
||||||
config = config,
|
config = config,
|
||||||
cmd = { 'LspInfo', 'LspLog', 'LspStart' },
|
cmd = { 'LspInfo', 'LspLog', 'LspStart' },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
{ 'kcl-lang/kcl.nvim' },
|
||||||
{ 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim
|
{ 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim
|
||||||
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
|
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
|
||||||
{
|
{
|
||||||
|
@ -384,7 +393,8 @@ local res = {
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = { 'williamboman/mason.nvim' },
|
dependencies = { 'williamboman/mason.nvim' },
|
||||||
config = config_mason_lsp,
|
opts = { automatic_installation = true },
|
||||||
|
-- config = config_mason_lsp,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'simrat39/rust-tools.nvim',
|
'simrat39/rust-tools.nvim',
|
||||||
|
|
|
@ -77,23 +77,6 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{ 'dyng/ctrlsf.vim', cmd = 'CtrlSF' },
|
{ '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',
|
'andymass/vim-matchup',
|
||||||
|
@ -159,5 +142,5 @@ return {
|
||||||
-- Your DBUI configuration
|
-- Your DBUI configuration
|
||||||
vim.g.db_ui_use_nerd_fonts = 1
|
vim.g.db_ui_use_nerd_fonts = 1
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,17 +12,6 @@ local M = {
|
||||||
|
|
||||||
function M.config()
|
function M.config()
|
||||||
local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
|
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 = {
|
ts_parsers.just = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo
|
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
|
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 {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
|
@ -38,6 +35,7 @@ function M.config()
|
||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
modules = {},
|
||||||
refactor = {
|
refactor = {
|
||||||
highlight_current_scope = { enable = false },
|
highlight_current_scope = { enable = false },
|
||||||
smart_rename = {
|
smart_rename = {
|
||||||
|
|
169
dot_config/nvim/queries/kcl/highlights.scm
Normal file
169
dot_config/nvim/queries/kcl/highlights.scm
Normal 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"))
|
Loading…
Add table
Reference in a new issue