From 17d2a6abc96f3cf6569effd0c32f45a806020578 Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Mon, 20 May 2024 18:46:50 +0200 Subject: [PATCH 01/22] my minimal setup --- init.lua | 110 ++++++++----------------------------------------------- 1 file changed, 15 insertions(+), 95 deletions(-) diff --git a/init.lua b/init.lua index 88658ef3033..2e5109ecb15 100644 --- a/init.lua +++ b/init.lua @@ -1,94 +1,8 @@ ---[[ - -===================================================================== -==================== 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 +-- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' +vim.g.mapleader = ',' +vim.g.maplocalleader = ',' -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = false @@ -176,10 +90,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 @@ -190,6 +104,11 @@ 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' }) +-- M64 additional keymaps + +vim.keymap.set('n', 'v', 'vnew', { desc = 'New vertical spit' }) +vim.keymap.set('n', ';', ':', { desc = 'For my lazy fingers ;)' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -375,13 +294,14 @@ require('lazy').setup({ vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) + vim.keymap.set('n', '', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) + vim.keymap.set('n', '', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() @@ -733,7 +653,7 @@ require('lazy').setup({ -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, --[''] = cmp.mapping.select_next_item(), --[''] = cmp.mapping.select_prev_item(), From a7d089777432ebf7ad017684104d55af0030e424 Mon Sep 17 00:00:00 2001 From: M64 Date: Mon, 20 May 2024 18:48:05 +0200 Subject: [PATCH 02/22] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f445b65ecd5..0161acadc7f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# kickstart.nvim +# kickstart.nvim / M64 personalized ## Introduction From f310c3677af61bd05f49257136b05d4478e7c60b Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Mon, 20 May 2024 23:39:46 +0200 Subject: [PATCH 03/22] added termninal handling --- init.lua | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index 2e5109ecb15..f46fea8f42b 100644 --- a/init.lua +++ b/init.lua @@ -5,7 +5,7 @@ vim.g.mapleader = ',' vim.g.maplocalleader = ',' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -105,8 +105,16 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the lower win vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) -- M64 additional keymaps - -vim.keymap.set('n', 'v', 'vnew', { desc = 'New vertical spit' }) +vim.keymap.set('n', 'v', 'vnew', { desc = 'New vertical spit' }) +-- vim.keymap.set('n', 'mm', 'vsplit | terminal make', { desc = 'make' }) +vim.keymap.set('n', 'mm', 'TermExec cmd=make direction=vertical', { desc = 'make' }) +-- vim.keymap.set('n', 'mc', 'vsplit | terminal make', { desc = 'make clean' }) +vim.keymap.set('n', 'mc', 'TermExec cmd="make clean" direction=vertical', { desc = 'make' }) +vim.keymap.set('n', 'v', 'vnew', { desc = 'New vertical spit' }) +-- vim.keymap.set('n', 'tt', 'vnew | terminal', { desc = 'New vertical spit with a terminal' }) +vim.keymap.set('n', 'tt', 'ToggleTerm direction=vertical size=80', { desc = 'New vertical spit with a terminal' }) +vim.keymap.set('n', '', 'ToggleTerm direction=vertical size=80', { desc = 'New vertical spit with a terminal' }) +vim.keymap.set('n', '', 'Neotree toggle position=right', { desc = 'Toggle Neotree' }) vim.keymap.set('n', ';', ':', { desc = 'For my lazy fingers ;)' }) -- [[ Basic Autocommands ]] @@ -158,7 +166,6 @@ require('lazy').setup({ -- "gc" to comment visual regions/lines { 'numToStr/Comment.nvim', opts = {} }, - -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following Lua: -- require('gitsigns').setup({ ... }) @@ -704,7 +711,7 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'tokyonight-moon' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -793,12 +800,12 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', + require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. @@ -806,6 +813,10 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` -- { import = 'custom.plugins' }, + + -- m64 additional plugins + + { 'akinsho/toggleterm.nvim', version = '*', config = true }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the From 7506d9fcb8600e1ee55af4082469aab03028059e Mon Sep 17 00:00:00 2001 From: M64 Date: Mon, 20 May 2024 23:47:19 +0200 Subject: [PATCH 04/22] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 0161acadc7f..dd25e892133 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ A starting point for Neovim that is: ## Installation + - If you have an existing setup, I recommend a full clean: + - back it up + - rm -rf ~/.local/share/nvim + - rm -rf ~/.config/nvim + + ### Install Neovim Kickstart.nvim targets *only* the latest From 1f7449d32566dcb7e3eec638c461b727148155fa Mon Sep 17 00:00:00 2001 From: M64 Date: Mon, 20 May 2024 23:52:37 +0200 Subject: [PATCH 05/22] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd25e892133..b2cdec25fef 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,15 @@ A starting point for Neovim that is: **NOT** a Neovim distribution, but instead a starting point for your configuration. ## Installation +TL;DR - If you have an existing setup, I recommend a full clean: - back it up - rm -rf ~/.local/share/nvim - rm -rf ~/.config/nvim - + - pull latest neovim sources and build current neovim from source + - clone this repo into ~/.config and rename it to nvim + ### Install Neovim From 1f73b5ca8f35f1474fc79abe1e5c07dd8b44c74d Mon Sep 17 00:00:00 2001 From: M64 Date: Tue, 21 May 2024 00:24:48 +0200 Subject: [PATCH 06/22] Update README.md --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2cdec25fef..2dcc55e3e0f 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,29 @@ A starting point for Neovim that is: **NOT** a Neovim distribution, but instead a starting point for your configuration. ## Installation -TL;DR +TL;DR +I have added toggleterm, neo-tree and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) + +You get a full C/C++ IDE config incl DAP debugging support working out of the box, clangd based: lsp, linter, formatter, dap config and what kickstart.nvim normally does (see below). You should build gdb from source to have DAP support. + +``` - If you have an existing setup, I recommend a full clean: - back it up - rm -rf ~/.local/share/nvim - rm -rf ~/.config/nvim - - pull latest neovim sources and build current neovim from source + - at latest now pull latest neovim sources and build current neovim from source, + - pull and compile gdb so you have version 14.1 with DAP support - clone this repo into ~/.config and rename it to nvim - + - start neovim, wait a bit and enjoy! +Some of the shortcuts + - ;: : (thx renerocksai for this idea!) + - ,mm: make + - ,mc: make clean + - : toggle persistent terminal + - : toggle neo-tree + - : keyword fuzzy search +``` ### Install Neovim From b57dd7a1221a54d0b6be03f6b7561e98fd4c26be Mon Sep 17 00:00:00 2001 From: M64 Date: Tue, 21 May 2024 00:30:35 +0200 Subject: [PATCH 07/22] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2dcc55e3e0f..bc302cdf291 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Some of the shortcuts - : toggle neo-tree - : keyword fuzzy search ``` +You can search for M64 in init.lua to find my changes. ### Install Neovim From efcfe272c1da3bdd3f40e6734cf2c59dc664174c Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Tue, 21 May 2024 00:32:40 +0200 Subject: [PATCH 08/22] added termninal handling --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f46fea8f42b..83b0818fb58 100644 --- a/init.lua +++ b/init.lua @@ -110,7 +110,6 @@ vim.keymap.set('n', 'v', 'vnew', { desc = 'New vertical spit' } vim.keymap.set('n', 'mm', 'TermExec cmd=make direction=vertical', { desc = 'make' }) -- vim.keymap.set('n', 'mc', 'vsplit | terminal make', { desc = 'make clean' }) vim.keymap.set('n', 'mc', 'TermExec cmd="make clean" direction=vertical', { desc = 'make' }) -vim.keymap.set('n', 'v', 'vnew', { desc = 'New vertical spit' }) -- vim.keymap.set('n', 'tt', 'vnew | terminal', { desc = 'New vertical spit with a terminal' }) vim.keymap.set('n', 'tt', 'ToggleTerm direction=vertical size=80', { desc = 'New vertical spit with a terminal' }) vim.keymap.set('n', '', 'ToggleTerm direction=vertical size=80', { desc = 'New vertical spit with a terminal' }) @@ -804,6 +803,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.indent_line', require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', + -- M64 require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps From de70f2eaef7bc34ffba5e27861f70a6998438bd2 Mon Sep 17 00:00:00 2001 From: M64 Date: Tue, 21 May 2024 01:07:40 +0200 Subject: [PATCH 09/22] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc302cdf291..eeabcc44dbd 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A starting point for Neovim that is: ## Installation TL;DR -I have added toggleterm, neo-tree and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) +I have added toggleterm, neo-tree, vim-fugitive, notify, telescope-env and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) You get a full C/C++ IDE config incl DAP debugging support working out of the box, clangd based: lsp, linter, formatter, dap config and what kickstart.nvim normally does (see below). You should build gdb from source to have DAP support. From 332dedec828dd2f0e8087722274bcc848badca9b Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Tue, 21 May 2024 01:08:05 +0200 Subject: [PATCH 10/22] configured notify --- init.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 83b0818fb58..af983d6e665 100644 --- a/init.lua +++ b/init.lua @@ -248,6 +248,7 @@ require('lazy').setup({ end, }, { 'nvim-telescope/telescope-ui-select.nvim' }, + { 'LinArcX/telescope-env.nvim' }, -- Useful for getting pretty icons, but requires a Nerd Font. { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, @@ -294,21 +295,25 @@ require('lazy').setup({ -- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') + pcall(require('telescope').load_extension, 'env') + pcall(require('telescope').load_extension, 'notify') -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) - vim.keymap.set('n', '', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) - vim.keymap.set('n', '', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) + -- M64 + vim.keymap.set('n', '', builtin.live_grep, { desc = '[S]earch by [G]rep' }) + vim.keymap.set('n', '', builtin.find_files, { desc = '[S]earch [F]iles' }) + -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. @@ -814,7 +819,9 @@ require('lazy').setup({ -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` -- { import = 'custom.plugins' }, - -- m64 additional plugins + -- M64 additional plugins + 'tpope/vim-fugitive', + 'rcarriga/nvim-notify', { 'akinsho/toggleterm.nvim', version = '*', config = true }, }, { @@ -839,5 +846,8 @@ require('lazy').setup({ }, }) +-- M64 +vim.notify = require 'notify' + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 4c4a437d58776b84069cc94c4b872928da87142e Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 19:50:50 +0200 Subject: [PATCH 11/22] Updated README --- README.md | 9 +++++---- init.lua | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eeabcc44dbd..7ffcda570ba 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # kickstart.nvim / M64 personalized ## Introduction @@ -13,10 +14,10 @@ A starting point for Neovim that is: ## Installation TL;DR -I have added toggleterm, neo-tree, vim-fugitive, notify, telescope-env and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) - -You get a full C/C++ IDE config incl DAP debugging support working out of the box, clangd based: lsp, linter, formatter, dap config and what kickstart.nvim normally does (see below). You should build gdb from source to have DAP support. - + + + + ``` - If you have an existing setup, I recommend a full clean: - back it up diff --git a/init.lua b/init.lua index af983d6e665..e249bbd9317 100644 --- a/init.lua +++ b/init.lua @@ -822,7 +822,6 @@ require('lazy').setup({ -- M64 additional plugins 'tpope/vim-fugitive', 'rcarriga/nvim-notify', - { 'akinsho/toggleterm.nvim', version = '*', config = true }, }, { ui = { From 40a22015eb12ac0886e99ee81c8d75ab6b445f4e Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 19:52:10 +0200 Subject: [PATCH 12/22] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ffcda570ba..4b38767dcee 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# kickstart.nvim / M64 personalized +# kickstart.nvim ## Introduction From 17f92e277d8b83d9121742d0c2acaa10d3fefe44 Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 19:55:06 +0200 Subject: [PATCH 13/22] Updated README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b38767dcee..62f59da9b11 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ TL;DR - back it up - rm -rf ~/.local/share/nvim - rm -rf ~/.config/nvim - - at latest now pull latest neovim sources and build current neovim from source, - - pull and compile gdb so you have version 14.1 with DAP support + - I strongly recommend to pull latest neovim sources and build current neovim from source + - I strongly recommend to pull and compile gdb so you have version 14.1 with DAP support - clone this repo into ~/.config and rename it to nvim - start neovim, wait a bit and enjoy! Some of the shortcuts From a7d9c125bfe2180175966c82ffd8b8bf771f311e Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:03:17 +0200 Subject: [PATCH 14/22] Updated README --- README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 62f59da9b11..ee78ce6de31 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,9 @@ A starting point for Neovim that is: ## Installation TL;DR - - - - +I have added toggleterm, neo-tree, vim-fugitive, notify, telescope-env and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) +You get a full C/C++ IDE config incl DAP debugging support working out of the box, clangd based: lsp, linter, formatter, dap config and what kickstart.nvim normally does (see below). You should build gdb from source to have DAP support. + ``` - If you have an existing setup, I recommend a full clean: - back it up @@ -35,7 +34,23 @@ Some of the shortcuts - : toggle neo-tree - : keyword fuzzy search ``` -You can search for M64 in init.lua to find my changes. +You can search for M64 in init.lua to find my changes. + +To get the full blown C/C++ IDE experience: + +When you have first started nvim after these steps, it autoinstalls and configures neovim. To get the full blown C/C++ IDE experience: have a look at `Mason`! + +In nvim start Mason by entering `:Mason`, select and install the following packages: + +``` + ◍ clangd + ◍ cpplint + ◍ cpptools + ◍ lua-language-server lua_ls + ◍ markdownlint +``` +to do so - hover over the corresponding package name from the list, and press `i` to install it. That's it! + ### Install Neovim From 42db60bc0da032c0c85b3635218e25baf8904c22 Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:04:52 +0200 Subject: [PATCH 15/22] Updated README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ee78ce6de31..95e88f03a86 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ In nvim start Mason by entering `:Mason`, select and install the following packa ◍ clangd ◍ cpplint ◍ cpptools - ◍ lua-language-server lua_ls ◍ markdownlint ``` to do so - hover over the corresponding package name from the list, and press `i` to install it. That's it! From d881bcaa4e481b6955ff11823c83f0d8302b36df Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:07:31 +0200 Subject: [PATCH 16/22] Updated README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 95e88f03a86..c36cec6b2ad 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ You get a full C/C++ IDE config incl DAP debugging support working out of the bo - I strongly recommend to pull and compile gdb so you have version 14.1 with DAP support - clone this repo into ~/.config and rename it to nvim - start neovim, wait a bit and enjoy! + Some of the shortcuts - ;: : (thx renerocksai for this idea!) - ,mm: make From f678deb3855a31cbeb373ca983a98e17d13f83e0 Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:14:52 +0200 Subject: [PATCH 17/22] Updated README --- README.md | 3 ++- init.lua | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c36cec6b2ad..36884e80302 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ You get a full C/C++ IDE config incl DAP debugging support working out of the bo - clone this repo into ~/.config and rename it to nvim - start neovim, wait a bit and enjoy! -Some of the shortcuts +Some of the shortcuts (my is comma) - ;: : (thx renerocksai for this idea!) + - ,v : open a new vsplit - ,mm: make - ,mc: make clean - : toggle persistent terminal diff --git a/init.lua b/init.lua index e249bbd9317..f70822b377f 100644 --- a/init.lua +++ b/init.lua @@ -75,6 +75,9 @@ vim.opt.scrolloff = 10 vim.opt.hlsearch = true vim.keymap.set('n', '', 'nohlsearch') +-- M64 additional settings +vim.opt.colorcolumn = '80' + -- Diagnostic keymaps vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) @@ -822,6 +825,7 @@ require('lazy').setup({ -- M64 additional plugins 'tpope/vim-fugitive', 'rcarriga/nvim-notify', + 'dstein64/nvim-scrollview', { 'akinsho/toggleterm.nvim', version = '*', config = true }, }, { ui = { From 8968cf3e612ced61befa95cfe638e59b8939a29c Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:17:49 +0200 Subject: [PATCH 18/22] Updated README, add scrollview, colorcolumn --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36884e80302..2df27ac6765 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ You get a full C/C++ IDE config incl DAP debugging support working out of the bo - start neovim, wait a bit and enjoy! Some of the shortcuts (my is comma) - - ;: : (thx renerocksai for this idea!) + - ; : : (thx renerocksai for this idea!) + - ,, : fuzzy select / open file - ,v : open a new vsplit - ,mm: make - ,mc: make clean From a20351799aa47737c0946e3257b2cf76ecf5e1b4 Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:19:39 +0200 Subject: [PATCH 19/22] Updated README --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2df27ac6765..e3fc32a3eac 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,14 @@ You get a full C/C++ IDE config incl DAP debugging support working out of the bo - start neovim, wait a bit and enjoy! Some of the shortcuts (my is comma) - - ; : : (thx renerocksai for this idea!) - - ,, : fuzzy select / open file - - ,v : open a new vsplit - - ,mm: make - - ,mc: make clean - - : toggle persistent terminal - - : toggle neo-tree - - : keyword fuzzy search + - ; : : (thx renerocksai for this idea!) + - ,, : fuzzy select / open file + - ,v : open a new vsplit + - ,mm : make (in persistent terminal) + - ,mc : make clean (in persistent terminal) + - : toggle persistent terminal + - : toggle neo-tree + - : keyword fuzzy search ``` You can search for M64 in init.lua to find my changes. From 1b491dd332897a8950d26536fa4002e7d8b4e6e0 Mon Sep 17 00:00:00 2001 From: M64GitHub Date: Thu, 23 May 2024 20:24:14 +0200 Subject: [PATCH 20/22] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e3fc32a3eac..f962c49ceda 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ You can search for M64 in init.lua to find my changes. To get the full blown C/C++ IDE experience: -When you have first started nvim after these steps, it autoinstalls and configures neovim. To get the full blown C/C++ IDE experience: have a look at `Mason`! +When you have first started nvim after these steps, it autoinstalls almost all packages, and configures neovim. To get the full blown C/C++ IDE experience: have a look at `Mason`! (I do not want to interfere with its's installation mechanisms -> you need to manually follow this steps, to complete setup) In nvim start Mason by entering `:Mason`, select and install the following packages: From c184eaaa22fe842f2513f7b0982d807febc118d8 Mon Sep 17 00:00:00 2001 From: M64 Date: Thu, 23 May 2024 20:27:02 +0200 Subject: [PATCH 21/22] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f962c49ceda..eba75dbe03b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A starting point for Neovim that is: ## Installation TL;DR -I have added toggleterm, neo-tree, vim-fugitive, notify, telescope-env and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) +I have added toggleterm, neo-tree, vim-fugitive, notify, scrollview, telescope-env and C/C++ incl. DAP support mainly, as well as little tweaks and shortcuts to make autocomplete more natural (ie. let autocomplete accept with enter) You get a full C/C++ IDE config incl DAP debugging support working out of the box, clangd based: lsp, linter, formatter, dap config and what kickstart.nvim normally does (see below). You should build gdb from source to have DAP support. ``` From 7e0acf66a91a335a9148dded5c89701b79ccfdb5 Mon Sep 17 00:00:00 2001 From: M64 Date: Thu, 23 May 2024 20:30:47 +0200 Subject: [PATCH 22/22] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index eba75dbe03b..68e9c8cd04e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # kickstart.nvim +My neovim config, based on kickstart. ## Introduction