From e13b2a00d68c26116ad0fcbdb0e954df22f4a10a Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 29 Dec 2024 12:44:28 +0100 Subject: [PATCH 1/5] Yeet llm related core --- lua/keymaps.lua | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index de9aecd..cc194a6 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -84,19 +84,6 @@ vim.keymap.set('n', '[', 'tabprevious', { desc = 'Previous vim.keymap.set('n', '\\', 'Neotree toggle', { desc = 'Toggle Neotree' }) vim.keymap.set('n', '0', 'ToggleTerm', { desc = 'Toggle Terminal' }) --- Toggle LLM Suggestions -vim.keymap.set('n', '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 vim.keymap.set('n', 'dw', function() -- Save the current 'textwidth' setting From dd012828bd4560b159fd6631f4a17f2d627534b3 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 29 Dec 2024 12:44:49 +0100 Subject: [PATCH 2/5] Make document wrap function more compact --- lua/keymaps.lua | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index cc194a6..75cea58 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -84,19 +84,12 @@ vim.keymap.set('n', '[', 'tabprevious', { desc = 'Previous vim.keymap.set('n', '\\', 'Neotree toggle', { desc = 'Toggle Neotree' }) vim.keymap.set('n', '0', 'ToggleTerm', { desc = 'Toggle Terminal' }) --- Define a function to wrap lines to 80 columns +-- Wraps document to specified column width vim.keymap.set('n', '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 From 480fa4899976d7afc28b1e4c656c8d4e66618931 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 29 Dec 2024 12:45:43 +0100 Subject: [PATCH 3/5] Fixmes and todos in comments --- lua/keymaps.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 75cea58..1b1a144 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -5,6 +5,8 @@ vim.opt.hlsearch = true vim.keymap.set('n', '', 'nohlsearch') +-- 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', 'e', vim.diagnostic.open_float, { desc = 'Show diagn vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) vim.keymap.set('n', 'l', 'Lazy', { desc = 'Lazy plugin manager' }) + +-- This is useful for quickly rerunning make or other similar tools +-- TODO: Reconsider binds vim.keymap.set('n', '1', '!!', { desc = 'Run last command' }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier @@ -81,6 +86,7 @@ vim.keymap.set('n', 'd', 'tabclose', { desc = 'Close Tab' vim.keymap.set('n', ']', 'tabnext', { desc = 'Next Tab' }) vim.keymap.set('n', '[', 'tabprevious', { desc = 'Previous Tab' }) +-- FIXME: These binds are not well considered vim.keymap.set('n', '\\', 'Neotree toggle', { desc = 'Toggle Neotree' }) vim.keymap.set('n', '0', 'ToggleTerm', { desc = 'Toggle Terminal' }) From 77b7c5bce1fb9b5a9cdb214d02147dc7b2fc1c70 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 29 Dec 2024 12:45:48 +0100 Subject: [PATCH 4/5] Changes from upstream --- lua/lazy-bootstrap.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/lazy-bootstrap.lua b/lua/lazy-bootstrap.lua index 5ea6ffc..8dc96c8 100644 --- a/lua/lazy-bootstrap.lua +++ b/lua/lazy-bootstrap.lua @@ -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) From c5903dd53319b42e2e6ec152a988a1b9149a9c19 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 29 Dec 2024 12:46:03 +0100 Subject: [PATCH 5/5] Attempt to remove webshit fonts --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e8c5b3e..f95ec48 100644 --- a/init.lua +++ b/init.lua @@ -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'