6 Commits
Author SHA1 Message Date
chris d0225e35a0 Updates to terminal helpers 2026-10-04 11:06:19 +01:00
chris eae0f8f231 Update files 2026-10-03 13:16:31 +01:00
chris 7ffe25702f Fix project typo 2026-09-12 19:44:18 +01:00
chris 75254adb1e Merge branch 'main' of labs.scarif.space:chris/nvim 2026-09-11 18:23:39 +01:00
chris dfbaf1bf68 Formatting 2026-09-11 18:22:12 +01:00
chris 2cde089e1e Update files 2026-09-02 20:21:07 +01:00
9 changed files with 54 additions and 11 deletions
+37 -1
View File
@@ -16,7 +16,7 @@ end
helpers.edit_cf('h', '/lua/helpers.lua')
---@param opts? { cmd?: string, win_opts?: table, buf_opts?: table }
---@param opts? { cmd?: string, win_opts?: table, buf_opts?: table, start_insert?: boolean }
helpers.open_term = function(opts, buf_opts)
opts = opts or {}
local cmd = opts.cmd or ''
@@ -58,8 +58,44 @@ helpers.open_term = function(opts, buf_opts)
end,
})
if opts.start_insert then
vim.cmd.startinsert()
end
end
---@param opts? { cmd?: string, win_opts?: table, buf_opts?: table, start_insert?: boolean }
helpers.toggle_term = function(cmd, opts, buf_opts)
local term_bufnr = -1
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.bo[bufnr].buftype == 'terminal' then
local name = vim.api.nvim_buf_get_name(bufnr)
if name:match(cmd .. '$') then
term_bufnr = bufnr
end
end
end
if term_bufnr ~= -1 then
vim.api.nvim_open_win(term_bufnr, true, opts.win_opts or {
style = 'minimal',
relative = 'editor',
width = width,
height = height,
row = math.ceil((vim.o.lines - height) / 2),
col = math.ceil((vim.o.columns - width) / 2),
border = 'single',
})
if opts.start_insert then
vim.cmd.startinsert()
end
return
end
if not opts.cmd then
opts.cmd = cmd
end
helpers.open_term(opts, buf_opts)
end
helpers.has_copilot = function()
return vim.fn.getenv 'COPILOT_API_KEY' ~= vim.NIL
+1
View File
@@ -381,6 +381,7 @@ local test_maps = {
local neotest = require 'neotest'
local bufnr = vim.api.nvim_get_current_buf()
local row = vim.api.nvim_win_get_cursor(0)[1] - 1
local adapters = neotest.state.adapter_ids()
local found = false
+6 -5
View File
@@ -46,11 +46,10 @@ return {
},
},
provider = 'openai_compatible',
request_timeout = 3,
throttle = 500, -- Increase to reduce costs and avoid rate limits
debounce = 400, -- Increase to reduce costs and avoid rate limits
request_timeout = 2.5,
throttle = 1500, -- Increase to reduce costs and avoid rate limits
debounce = 600, -- Increase to reduce costs and avoid rate limits
n_completions = 1,
before_cursor_filter_length = 10,
provider_options = {
openai_compatible = {
api_key = 'COMPLETION_OPENAI_API_KEY',
@@ -58,15 +57,17 @@ return {
model = vim.env.COMPLETION_MODEL,
name = 'Openrouter',
optional = {
max_tokens = 300,
max_tokens = 56,
top_p = 0.9,
provider = {
-- Prioritize throughput for faster completion
sort = 'throughput',
},
reasoning_effort = 'none',
},
},
},
}
end,
}
+2 -2
View File
@@ -26,14 +26,14 @@ return function(dir)
vim.api.nvim_create_autocmd({ 'BufWritePre' }, {
pattern = { '*.js', '*.ts', '*.vue' },
callback = function(args)
helpers.format_buffer('eslint_d', args.buf)
helpers.format_buffer('eslint_d', args.buf, dir .. '/client/')
end,
})
laravel_utils.laravel_keymaps(dir .. '/server/')
laravel_utils.laravel_makes(dir .. '/server/')
laravel_utils.laravel_utils(dir .. '/server/')
laravel_utils.laravel_bookmark(dir .. '/server/')
laravel_utils.laravel_bookmarks(dir .. '/server/')
create_bookmark('E', dir .. '/client/src/types/api/endpointMap.d.ts')
create_bookmark('q', dir .. '/client/quasar.config.ts')
+1
View File
@@ -1 +1,2 @@
return {}
+2 -1
View File
@@ -120,7 +120,7 @@ utils.Etr = function(trigger, description, options)
trigger,
description,
vim.tbl_extend('force', {
condition = line_end
condition = line_end,
}, options or {})
)
end
@@ -150,3 +150,4 @@ utils.bs = function(trigger, nodes, options)
end
return utils
+1
View File
@@ -14,3 +14,4 @@ function M.open(name)
end
return M
+1
View File
@@ -51,3 +51,4 @@ function M:report_exit_status(handle, request)
end
return M
+2 -1
View File
@@ -5,4 +5,5 @@ vim.cmd('highlight LineNr guifg=' .. line_number_color)
vim.cmd('highlight LineNrAbove guifg=' .. line_number_color)
vim.cmd('highlight LineNrBelow guifg=' .. line_number_color)
vim.api.nvim_set_hl(0, "CopilotSuggestion", { fg = "#888888", italic = true })
vim.api.nvim_set_hl(0, 'CopilotSuggestion', { fg = '#888888', italic = true })