Compare commits

..

5 commits

Author SHA1 Message Date
Imbus
c5903dd533 Attempt to remove webshit fonts 2024-12-29 12:46:03 +01:00
Imbus
77b7c5bce1 Changes from upstream 2024-12-29 12:45:48 +01:00
Imbus
480fa48999 Fixmes and todos in comments 2024-12-29 12:45:43 +01:00
Imbus
dd012828bd Make document wrap function more compact 2024-12-29 12:44:49 +01:00
Imbus
e13b2a00d6 Yeet llm related core 2024-12-29 12:44:28 +01:00
3 changed files with 17 additions and 28 deletions

View file

@ -24,7 +24,7 @@ vim.g.sysname = vim.g.os_uname.sysname -- "Linux, FreeBSD, ..."
vim.g.arch = vim.g.os_uname.machine -- "x86_64, ..."
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = true
vim.g.have_nerd_font = false
-- [[ Setting options ]]
require 'options'

View file

@ -5,6 +5,8 @@
vim.opt.hlsearch = true
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- FIXME: Port to current API
-- Diagnostic keymaps
---@diagnostic disable-next-line: deprecated
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
@ -15,6 +17,9 @@ vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagn
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
vim.keymap.set('n', '<leader>l', '<cmd>Lazy<CR>', { desc = 'Lazy plugin manager' })
-- This is useful for quickly rerunning make or other similar tools
-- TODO: Reconsider binds
vim.keymap.set('n', '<leader>1', '<cmd>!!<CR>', { desc = 'Run last command' })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
@ -81,35 +86,16 @@ vim.keymap.set('n', '<leader><tab>d', '<cmd>tabclose<cr>', { desc = 'Close Tab'
vim.keymap.set('n', '<leader><tab>]', '<cmd>tabnext<cr>', { desc = 'Next Tab' })
vim.keymap.set('n', '<leader><tab>[', '<cmd>tabprevious<cr>', { desc = 'Previous Tab' })
-- FIXME: These binds are not well considered
vim.keymap.set('n', '\\', '<cmd>Neotree toggle<cr>', { desc = 'Toggle Neotree' })
vim.keymap.set('n', '0', '<cmd>ToggleTerm<cr>', { desc = 'Toggle Terminal' })
-- Toggle LLM Suggestions
vim.keymap.set('n', '<leader>tt', function()
local cp = require 'copilot.suggestion'
cp.toggle_auto_trigger()
if vim.b.copilot_suggestion_auto_trigger then
vim.notify 'Suggestions Enabled'
else
vim.notify 'Suggestions Disabled'
end
end, { desc = '[T]oggle LLM Suggestion Auto-[T]rigger' })
-- Define a function to wrap lines to 80 columns
-- Wraps document to specified column width
vim.keymap.set('n', '<leader>dw', function()
-- Save the current 'textwidth' setting
local current_tw = vim.o.textwidth
-- Set 'textwidth' to 80 temporarily
vim.o.textwidth = 80
-- Reformat all lines in the buffer
vim.api.nvim_command 'normal! ggVGgq'
-- Restore the original 'textwidth'
vim.o.textwidth = current_tw
local current_tw = vim.o.textwidth -- Save the current 'textwidth' setting
vim.o.textwidth = 80 -- Set 'textwidth' to 80 temporarily
vim.api.nvim_command 'normal! ggVGgq' -- Reformat all lines in the buffer
vim.o.textwidth = current_tw -- Restore the original 'textwidth'
end, { desc = '[D]ocument [W]rap to 80 column width' })
-- vim: ts=2 sts=2 sw=2 et

View file

@ -1,9 +1,12 @@
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
if vim.v.shell_error ~= 0 then
error('Error cloning lazy.nvim:\n' .. out)
end
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)