From 1465c9c303ebab7833143a50825ac56c8241356f Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Thu, 20 Mar 2025 22:07:50 +0100 Subject: [PATCH 1/7] Update init.lua --- init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 1427b6c7d5d..a512a474839 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -241,7 +241,7 @@ require('lazy').setup({ -- -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. -- - + -- { 'numToStr/Comment.nvim', opts = {} }, -- Alternatively, use `config = function() ... end` for full control over the configuration. -- If you prefer to call `setup` explicitly, use: -- { @@ -667,6 +667,7 @@ require('lazy').setup({ -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, + html = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -987,7 +988,7 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', From 65a4d0e7d0a3d3cdbf369fb9cf22ecd517b1e93e Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Thu, 20 Mar 2025 22:53:41 +0100 Subject: [PATCH 2/7] p5 --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index a512a474839..f759fdc0d48 100644 --- a/init.lua +++ b/init.lua @@ -194,6 +194,9 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- TODO: EGEN TEXT +vim.keymap.set('n', 'p', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` From 42ca77d1cc33f09fdb3f422b75fedb42bf3aeebb Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Fri, 21 Mar 2025 15:03:33 +0100 Subject: [PATCH 3/7] Keybinds --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f759fdc0d48..3bcaaf25d86 100644 --- a/init.lua +++ b/init.lua @@ -185,6 +185,9 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- vim.keymap.set('n', '', 'echo "Use k to move!!"') -- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', 'L', '$') +vim.keymap.set('n', 'H', '0') + -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows -- @@ -843,7 +846,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines From 21f9914a36c67bbc5e3be54801dedb4dd6717e34 Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Sat, 22 Mar 2025 20:18:43 +0100 Subject: [PATCH 4/7] Update init.lua --- init.lua | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 3bcaaf25d86..522ae454f92 100644 --- a/init.lua +++ b/init.lua @@ -184,13 +184,23 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- vim.keymap.set('n', '', 'echo "Use l to move!!"') -- vim.keymap.set('n', '', 'echo "Use k to move!!"') -- vim.keymap.set('n', '', 'echo "Use j to move!!"') +-- Keybinds to make split navigation easier. +-- Use CTRL+ to switch between windows +-- +-- TODO: EGEN TEXT +vim.keymap.set('n', 'ls', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) +vim.keymap.set('n', 'e', ':Ex', { desc = 'Explore working directory' }) +-- vim.keymap.set('n', 'lt', 'O', { desc = 'Define type for js' }) +vim.keymap.set('n', 'lt', 'O/** @type {} */F}i', { desc = 'Define type for js' }) +-- TODO: Bevægelse vim.keymap.set('n', 'L', '$') vim.keymap.set('n', 'H', '0') +vim.keymap.set('v', 'L', '$') +vim.keymap.set('v', 'H', '0') +vim.keymap.set('v', 'J', ":m '>+1gv=gv") +vim.keymap.set('v', 'K', ":m '<-2gv=gv") --- Keybinds to make split navigation easier. --- Use CTRL+ to switch between windows --- -- See `:help wincmd` for a list of all window commands vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) @@ -198,8 +208,9 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the lower win vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) -- TODO: EGEN TEXT -vim.keymap.set('n', 'p', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) - +-- vim.keymap.set('n', 'ls', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) +-- vim.keymap.set('n', 'e', ':Ex', { desc = 'Explore working directory' }) +-- -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` From a3aa476cbec0159b610019e62b5e02a78731a677 Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Sat, 22 Mar 2025 21:03:47 +0100 Subject: [PATCH 5/7] Update init.lua --- init.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/init.lua b/init.lua index 522ae454f92..2d23a14d22a 100644 --- a/init.lua +++ b/init.lua @@ -190,7 +190,6 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- TODO: EGEN TEXT vim.keymap.set('n', 'ls', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) vim.keymap.set('n', 'e', ':Ex', { desc = 'Explore working directory' }) --- vim.keymap.set('n', 'lt', 'O', { desc = 'Define type for js' }) vim.keymap.set('n', 'lt', 'O/** @type {} */F}i', { desc = 'Define type for js' }) -- TODO: Bevægelse @@ -207,9 +206,6 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) --- TODO: EGEN TEXT --- vim.keymap.set('n', 'ls', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) --- vim.keymap.set('n', 'e', ':Ex', { desc = 'Explore working directory' }) -- -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` From 7b38933b73c0b3ff0a33016e2e1fae5884c3d0e1 Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:43:27 +0100 Subject: [PATCH 6/7] Update init.lua --- init.lua | 102 ++++++------------------------------------------------- 1 file changed, 10 insertions(+), 92 deletions(-) diff --git a/init.lua b/init.lua index 2d23a14d22a..567bc4ca958 100644 --- a/init.lua +++ b/init.lua @@ -1,89 +1,3 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== -======== |.-""""""""""""""""""-.| |-----| ======== -======== || || | === | ======== -======== || KICKSTART.NVIM || |-----| ======== -======== || || | === | ======== -======== || || |-----| ======== -======== ||:Tutor || |:::::| ======== -======== |'-..................-'| |____o| ======== -======== `"")----------------(""` ___________ ======== -======== /::::::::::| |::::::::::\ \ no mouse \ ======== -======== /:::========| |==hjkl==:::\ \ required \ ======== -======== '""""""""""""' '""""""""""""' '""""""""""' ======== -======== ======== -===================================================================== -===================================================================== - -What is Kickstart? - - Kickstart.nvim is *not* a distribution. - - Kickstart.nvim is a starting point for your own configuration. - The goal is that you can read every line of code, top-to-bottom, understand - what your configuration is doing, and modify it to suit your needs. - - Once you've done that, you can start exploring, configuring and tinkering to - make Neovim your own! That might mean leaving Kickstart just the way it is for a while - or immediately breaking it into modular pieces. It's up to you! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example which will only take 10-15 minutes: - - https://learnxinyminutes.com/docs/lua/ - - After understanding a bit more about Lua, you can use `:help lua-guide` as a - reference for how Neovim integrates Lua. - - :help lua-guide - - (or HTML version): https://neovim.io/doc/user/lua-guide.html - -Kickstart Guide: - - TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. - - If you don't know what this means, type the following: - - - - : - - Tutor - - - - (If you already know the Neovim basics, you can skip this step.) - - Once you've completed that, you can continue working through **AND READING** the rest - of the kickstart init.lua. - - Next, run AND READ `:help`. - This will open up a help window with some basic information - about reading, navigating and searching the builtin help documentation. - - This should be the first place you go to look when you're stuck or confused - with something. It's one of my favorite Neovim features. - - MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, - which is very useful when you're not exactly sure of what you're looking for. - - I have left several `:help X` comments throughout the init.lua - These are hints about where to find more information about the relevant settings, - plugins or Neovim features used in Kickstart. - - NOTE: Look for lines like this - - Throughout the file. These are for you, the reader, to help you understand what is happening. - Feel free to delete them once you know what you're doing, but they should serve as a guide - for when you are first encountering a few different constructs in your Neovim config. - -If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. - -I hope you enjoy your Neovim journey, -- TJ - -P.S. You can delete this when you're done too. It's your config now! :) ---]] - -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) @@ -145,7 +59,7 @@ vim.opt.splitbelow = true -- See `:help 'list'` -- and `:help 'listchars'` vim.opt.list = true -vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } +vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '␣' } -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' @@ -154,7 +68,7 @@ vim.opt.inccommand = 'split' vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. -vim.opt.scrolloff = 10 +vim.opt.scrolloff = 20 -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), -- instead raise a dialog asking if you wish to save the current file(s) @@ -180,10 +94,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows -- @@ -191,6 +105,7 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } vim.keymap.set('n', 'ls', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) vim.keymap.set('n', 'e', ':Ex', { desc = 'Explore working directory' }) vim.keymap.set('n', 'lt', 'O/** @type {} */F}i', { desc = 'Define type for js' }) +vim.keymap.set('i', '', '', { silent = true }) -- TODO: Bevægelse vim.keymap.set('n', 'L', '$') @@ -200,6 +115,9 @@ vim.keymap.set('v', 'H', '0') vim.keymap.set('v', 'J', ":m '>+1gv=gv") vim.keymap.set('v', 'K', ":m '<-2gv=gv") +-- TODO: Erstat +vim.keymap.set('n', 'S', [[:%s/\<\>//gI]], { desc = 'Erstat' }) + -- See `:help wincmd` for a list of all window commands vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) From ed9ae27642c91bf34c4ba191bd612749d836432e Mon Sep 17 00:00:00 2001 From: MortenB22R <49730926+mortensb1@users.noreply.github.com> Date: Tue, 15 Apr 2025 20:39:14 +0200 Subject: [PATCH 7/7] L,H Movement --- init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 567bc4ca958..937bda6fd57 100644 --- a/init.lua +++ b/init.lua @@ -103,15 +103,16 @@ vim.keymap.set('n', '', 'echo "Use j to move!!"') -- -- TODO: EGEN TEXT vim.keymap.set('n', 'ls', ':!start cmd.exe /K "live-server"', { desc = 'Live server Run' }) +vim.keymap.set('n', 'lr', ':!cargo run', { desc = 'Rust: Cargo Run' }) vim.keymap.set('n', 'e', ':Ex', { desc = 'Explore working directory' }) vim.keymap.set('n', 'lt', 'O/** @type {} */F}i', { desc = 'Define type for js' }) vim.keymap.set('i', '', '', { silent = true }) -- TODO: Bevægelse -vim.keymap.set('n', 'L', '$') -vim.keymap.set('n', 'H', '0') -vim.keymap.set('v', 'L', '$') -vim.keymap.set('v', 'H', '0') +vim.keymap.set({ 'n', 'x', 'o' }, 'L', '$') +vim.keymap.set({ 'n', 'x', 'o' }, 'H', '^') +-- vim.keymap.set('v', 'L', '$') +-- vim.keymap.set('v', 'H', '0') vim.keymap.set('v', 'J', ":m '>+1gv=gv") vim.keymap.set('v', 'K', ":m '<-2gv=gv")