From a722914de8871808308cf4ef8230fff5c4c7f4e3 Mon Sep 17 00:00:00 2001 From: Ekshef Date: Thu, 5 Jun 2025 20:31:22 -0700 Subject: [PATCH 1/5] added plugins of harpoon, copilot(not activaited) as well as keymaps --- README.md | 2 +- init.lua | 143 ++++++++++++++++++++++++++++++++---- lua/custom/plugins/init.lua | 2 +- 3 files changed, 129 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8ace8b9b22b..979154994dc 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ sudo mkdir -p /opt/nvim-linux-x86_64 sudo chmod a+rX /opt/nvim-linux-x86_64 sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz -# make it available in /usr/local/bin, distro installs to /usr/bin +# make it available in /usr/local/bin, distro installs to /usr/bi? sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ ``` diff --git a/init.lua b/init.lua index 776c6873ff6..63f193baf0e 100644 --- a/init.lua +++ b/init.lua @@ -26,9 +26,7 @@ What is Kickstart? 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 + what your configuration is doing, and modify it to suit your nee 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! @@ -90,6 +88,9 @@ P.S. You can delete this when you're done too. It's your config now! :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +-- I set this. +vim.keymap.set('n', 'op', vim.cmd.Ex, { desc = 'Opens netRW' }) + -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = false @@ -102,7 +103,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' @@ -275,6 +276,42 @@ require('lazy').setup({ }, }, }, + { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + }, + + -- Start Copilot + -- { + -- 'zbirenbaum/copilot.lua', + -- cmd = 'Copilot', + -- event = 'InsertEnter', + -- config = function() + -- require('copilot').setup { + -- suggestion = { enabled = true }, + -- panel = { enabled = true, auto_refresh = true }, + -- } + -- end, + -- }, + -- { + -- 'giuxtaposition/blink-cmp-copilot', + -- config = function() + -- require('copilot').setup { + -- suggestion = { + -- enabled = true, + -- auto_trigger = true, + -- keymap = { + -- accept = '', + -- next = '', + -- prev = '', + -- dismiss = '', + -- }, + -- }, + -- panel = { enabled = false }, + -- } + -- end, + -- }, -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- @@ -482,7 +519,27 @@ require('lazy').setup({ { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by blink.cmp - 'saghen/blink.cmp', + { + 'saghen/blink.cmp', + -- dependencies = { + -- { + -- 'giuxtaposition/blink-cmp-copilot', + -- }, + -- }, + -- opts = { + -- sources = { + -- default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot' }, + -- providers = { + -- copilot = { + -- name = 'copilot', + -- module = 'blink-cmp-copilot', + -- score_offset = 100, + -- async = true, + -- }, + -- }, + -- }, + -- }, + }, }, config = function() -- Brief aside: **What is LSP?** @@ -617,9 +674,6 @@ require('lazy').setup({ end end, }) - - -- Diagnostic Config - -- See :help vim.diagnostic.Opts vim.diagnostic.config { severity_sort = true, float = { border = 'rounded', source = 'if_many' }, @@ -663,7 +717,15 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, + clangd = { + settings = { + clangd = { + completion = { + callSnippet = 'Replace', + }, + }, + }, + }, -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, @@ -674,7 +736,6 @@ require('lazy').setup({ -- -- But for many setups, the LSP (`ts_ls`) will work just fine -- ts_ls = {}, - -- lua_ls = { -- cmd = { ... }, @@ -727,6 +788,11 @@ require('lazy').setup({ } end, }, + { + 'pmizio/typescript-tools.nvim', + dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, + opts = {}, + }, { -- Autoformat 'stevearc/conform.nvim', @@ -801,6 +867,7 @@ require('lazy').setup({ opts = {}, }, 'folke/lazydev.nvim', + -- 'guixtaposition/blink-cmp-copilot', }, --- @module 'blink.cmp' --- @type blink.cmp.Config @@ -846,9 +913,17 @@ require('lazy').setup({ }, sources = { + -- + --iadddcoopilottothiss default = { 'lsp', 'path', 'snippets', 'lazydev' }, providers = { lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, + -- copilot = { + -- name = 'copilot', + -- module = 'blink-cmp-copilot', + -- score_offset = 100, + -- async = true, + -- }, }, }, @@ -878,6 +953,7 @@ require('lazy').setup({ config = function() ---@diagnostic disable-next-line: missing-fields require('tokyonight').setup { + transparent = true, styles = { comments = { italic = false }, -- Disable italics in comments }, @@ -965,18 +1041,19 @@ 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.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + vim.keymap.set('n', '', ':Neotree toggle', { desc = 'open explore s s' }), -- 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. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! @@ -1004,5 +1081,39 @@ require('lazy').setup({ }, }) +local harpoon = require 'harpoon' + +-- REQUIRED +harpoon:setup() +-- REQUIRED + +vim.keymap.set('n', 'a', function() + harpoon:list():add() +end, { desc = 'Add file to harpoon list.' }) +vim.keymap.set('n', '', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) +end, { desc = 'Toggle harpoon quick menu.' }) + +vim.keymap.set('n', '1', function() + harpoon:list():select(1) +end, { desc = 'Navigate to file at harpoon posistion 1' }) +vim.keymap.set('n', '2', function() + harpoon:list():select(2) +end, { desc = 'Navigate to file at harpoon posistion 2' }) +vim.keymap.set('n', '3', function() + harpoon:list():select(3) +end, { desc = 'Navigate to file at harpoon posistion 3' }) +vim.keymap.set('n', '4', function() + harpoon:list():select(4) +end, { desc = 'Navigate to file at harpoon posistion 4' }) + +-- Toggle previous & next buffers stored within Harpoon list +vim.keymap.set('n', '', function() + harpoon:list():prev() +end, { desc = 'Harpoon previous file' }) +vim.keymap.set('n', '', function() + harpoon:list():next() +end, { desc = 'Harpoon next file' }) + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..c7670abd26c 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,4 +1,4 @@ --- You can add your own plugins here or in other files in this directory! +-- Yok can add your own plugins here or in other files in this directory! -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information From 1fd91a008dfd7ddbe62639bf5003c81d99c1539c Mon Sep 17 00:00:00 2001 From: Ekshef Date: Thu, 5 Jun 2025 20:35:24 -0700 Subject: [PATCH 2/5] Removed accidental file push --- README.md | 240 ------------------------------------ lua/custom/plugins/init.lua | 5 - 2 files changed, 245 deletions(-) delete mode 100644 README.md delete mode 100644 lua/custom/plugins/init.lua diff --git a/README.md b/README.md deleted file mode 100644 index 979154994dc..00000000000 --- a/README.md +++ /dev/null @@ -1,240 +0,0 @@ -# kickstart.nvim - -## Introduction - -A starting point for Neovim that is: - -* Small -* Single-file -* Completely Documented - -**NOT** a Neovim distribution, but instead a starting point for your configuration. - -## Installation - -### Install Neovim - -Kickstart.nvim targets *only* the latest -['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest -['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. -If you are experiencing issues, please make sure you have the latest versions. - -### Install External Dependencies - -External Requirements: -- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) -- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) -- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) -- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - - if you have it set `vim.g.have_nerd_font` in `init.lua` to true -- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` -- Language Setup: - - If you want to write Typescript, you need `npm` - - If you want to write Golang, you will need `go` - - etc. - -> [!NOTE] -> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes -> and quick install snippets - -### Install Kickstart - -> [!NOTE] -> [Backup](#FAQ) your previous configuration (if any exists) - -Neovim's configurations are located under the following paths, depending on your OS: - -| OS | PATH | -| :- | :--- | -| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%localappdata%\nvim\` | -| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | - -#### Recommended Step - -[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo -so that you have your own copy that you can modify, then install by cloning the -fork to your machine using one of the commands below, depending on your OS. - -> [!NOTE] -> Your fork's URL will be something like this: -> `https://github.com//kickstart.nvim.git` - -You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file -too - it's ignored in the kickstart repo to make maintenance easier, but it's -[recommended to track it in version control](https://lazy.folke.io/usage/lockfile). - -#### Clone kickstart.nvim - -> [!NOTE] -> If following the recommended step above (i.e., forking the repo), replace -> `nvim-lua` with `` in the commands below - -
Linux and Mac - -```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim -``` - -
- -
Windows - -If you're using `cmd.exe`: - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" -``` - -If you're using `powershell.exe` - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" -``` - -
- -### Post Installation - -Start Neovim - -```sh -nvim -``` - -That's it! Lazy will install all the plugins you have. Use `:Lazy` to view -the current plugin status. Hit `q` to close the window. - -#### Read The Friendly Documentation - -Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. That also includes -examples of adding popularly requested plugins. - -> [!NOTE] -> For more information about a particular plugin check its repository's documentation. - - -### Getting Started - -[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) - -### FAQ - -* What should I do if I already have a pre-existing Neovim configuration? - * You should back it up and then delete all associated files. - * This includes your existing init.lua and the Neovim files in `~/.local` - which can be deleted with `rm -rf ~/.local/share/nvim/` -* Can I keep my existing configuration in parallel to kickstart? - * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` - to maintain multiple configurations. For example, you can install the kickstart - configuration in `~/.config/nvim-kickstart` and create an alias: - ``` - alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' - ``` - When you run Neovim using `nvim-kickstart` alias it will use the alternative - config directory and the matching local directory - `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim - distribution that you would like to try out. -* What if I want to "uninstall" this configuration: - * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information -* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? - * The main purpose of kickstart is to serve as a teaching tool and a reference - configuration that someone can easily use to `git clone` as a basis for their own. - As you progress in learning Neovim and Lua, you might consider splitting `init.lua` - into smaller parts. A fork of kickstart that does this while maintaining the - same functionality is available here: - * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) - * Discussions on this topic can be found here: - * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) - * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) - -### Install Recipes - -Below you can find OS specific install instructions for Neovim and dependencies. - -After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. - -#### Windows Installation - -
Windows with Microsoft C++ Build Tools and CMake -Installation may require installing build tools and updating the run command for `telescope-fzf-native` - -See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) - -This requires: - -- Install CMake and the Microsoft C++ Build Tools on Windows - -```lua -{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } -``` -
-
Windows with gcc/make using chocolatey -Alternatively, one can install gcc and make which don't require changing the config, -the easiest way is to use choco: - -1. install [chocolatey](https://chocolatey.org/install) -either follow the instructions on the page or use winget, -run in cmd as **admin**: -``` -winget install --accept-source-agreements chocolatey.chocolatey -``` - -2. install all requirements using choco, exit the previous cmd and -open a new one so that choco path is set, and run in cmd as **admin**: -``` -choco install -y neovim git ripgrep wget fd unzip gzip mingw make -``` -
-
WSL (Windows Subsystem for Linux) - -``` -wsl --install -wsl -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
- -#### Linux Install -
Ubuntu Install Steps - -``` -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
-
Debian Install Steps - -``` -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip curl - -# Now we install nvim -curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz -sudo rm -rf /opt/nvim-linux-x86_64 -sudo mkdir -p /opt/nvim-linux-x86_64 -sudo chmod a+rX /opt/nvim-linux-x86_64 -sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz - -# make it available in /usr/local/bin, distro installs to /usr/bi? -sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ -``` -
-
Fedora Install Steps - -``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim -``` -
- -
Arch Install Steps - -``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim -``` -
- diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua deleted file mode 100644 index c7670abd26c..00000000000 --- a/lua/custom/plugins/init.lua +++ /dev/null @@ -1,5 +0,0 @@ --- Yok can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information -return {} From ba0893e9bac5c8cd39ac99dd581b3d1c61161851 Mon Sep 17 00:00:00 2001 From: Ekshef Date: Fri, 6 Jun 2025 19:17:05 -0700 Subject: [PATCH 3/5] set vim spelling and dirty talk up. et al. --- README.md | 240 ++++++++++++++++++++++++++++++++++++ init.lua | 10 ++ lua/custom/plugins/init.lua | 5 + 3 files changed, 255 insertions(+) create mode 100644 README.md create mode 100644 lua/custom/plugins/init.lua diff --git a/README.md b/README.md new file mode 100644 index 00000000000..979154994dc --- /dev/null +++ b/README.md @@ -0,0 +1,240 @@ +# kickstart.nvim + +## Introduction + +A starting point for Neovim that is: + +* Small +* Single-file +* Completely Documented + +**NOT** a Neovim distribution, but instead a starting point for your configuration. + +## Installation + +### Install Neovim + +Kickstart.nvim targets *only* the latest +['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest +['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. +If you are experiencing issues, please make sure you have the latest versions. + +### Install External Dependencies + +External Requirements: +- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) +- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) +- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) +- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons + - if you have it set `vim.g.have_nerd_font` in `init.lua` to true +- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` +- Language Setup: + - If you want to write Typescript, you need `npm` + - If you want to write Golang, you will need `go` + - etc. + +> [!NOTE] +> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes +> and quick install snippets + +### Install Kickstart + +> [!NOTE] +> [Backup](#FAQ) your previous configuration (if any exists) + +Neovim's configurations are located under the following paths, depending on your OS: + +| OS | PATH | +| :- | :--- | +| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | +| Windows (cmd)| `%localappdata%\nvim\` | +| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | + +#### Recommended Step + +[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo +so that you have your own copy that you can modify, then install by cloning the +fork to your machine using one of the commands below, depending on your OS. + +> [!NOTE] +> Your fork's URL will be something like this: +> `https://github.com//kickstart.nvim.git` + +You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file +too - it's ignored in the kickstart repo to make maintenance easier, but it's +[recommended to track it in version control](https://lazy.folke.io/usage/lockfile). + +#### Clone kickstart.nvim + +> [!NOTE] +> If following the recommended step above (i.e., forking the repo), replace +> `nvim-lua` with `` in the commands below + +
Linux and Mac + +```sh +git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +``` + +
+ +
Windows + +If you're using `cmd.exe`: + +``` +git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" +``` + +If you're using `powershell.exe` + +``` +git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" +``` + +
+ +### Post Installation + +Start Neovim + +```sh +nvim +``` + +That's it! Lazy will install all the plugins you have. Use `:Lazy` to view +the current plugin status. Hit `q` to close the window. + +#### Read The Friendly Documentation + +Read through the `init.lua` file in your configuration folder for more +information about extending and exploring Neovim. That also includes +examples of adding popularly requested plugins. + +> [!NOTE] +> For more information about a particular plugin check its repository's documentation. + + +### Getting Started + +[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) + +### FAQ + +* What should I do if I already have a pre-existing Neovim configuration? + * You should back it up and then delete all associated files. + * This includes your existing init.lua and the Neovim files in `~/.local` + which can be deleted with `rm -rf ~/.local/share/nvim/` +* Can I keep my existing configuration in parallel to kickstart? + * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` + to maintain multiple configurations. For example, you can install the kickstart + configuration in `~/.config/nvim-kickstart` and create an alias: + ``` + alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' + ``` + When you run Neovim using `nvim-kickstart` alias it will use the alternative + config directory and the matching local directory + `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim + distribution that you would like to try out. +* What if I want to "uninstall" this configuration: + * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information +* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? + * The main purpose of kickstart is to serve as a teaching tool and a reference + configuration that someone can easily use to `git clone` as a basis for their own. + As you progress in learning Neovim and Lua, you might consider splitting `init.lua` + into smaller parts. A fork of kickstart that does this while maintaining the + same functionality is available here: + * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) + * Discussions on this topic can be found here: + * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) + * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) + +### Install Recipes + +Below you can find OS specific install instructions for Neovim and dependencies. + +After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. + +#### Windows Installation + +
Windows with Microsoft C++ Build Tools and CMake +Installation may require installing build tools and updating the run command for `telescope-fzf-native` + +See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) + +This requires: + +- Install CMake and the Microsoft C++ Build Tools on Windows + +```lua +{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } +``` +
+
Windows with gcc/make using chocolatey +Alternatively, one can install gcc and make which don't require changing the config, +the easiest way is to use choco: + +1. install [chocolatey](https://chocolatey.org/install) +either follow the instructions on the page or use winget, +run in cmd as **admin**: +``` +winget install --accept-source-agreements chocolatey.chocolatey +``` + +2. install all requirements using choco, exit the previous cmd and +open a new one so that choco path is set, and run in cmd as **admin**: +``` +choco install -y neovim git ripgrep wget fd unzip gzip mingw make +``` +
+
WSL (Windows Subsystem for Linux) + +``` +wsl --install +wsl +sudo add-apt-repository ppa:neovim-ppa/unstable -y +sudo apt update +sudo apt install make gcc ripgrep unzip git xclip neovim +``` +
+ +#### Linux Install +
Ubuntu Install Steps + +``` +sudo add-apt-repository ppa:neovim-ppa/unstable -y +sudo apt update +sudo apt install make gcc ripgrep unzip git xclip neovim +``` +
+
Debian Install Steps + +``` +sudo apt update +sudo apt install make gcc ripgrep unzip git xclip curl + +# Now we install nvim +curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz +sudo rm -rf /opt/nvim-linux-x86_64 +sudo mkdir -p /opt/nvim-linux-x86_64 +sudo chmod a+rX /opt/nvim-linux-x86_64 +sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz + +# make it available in /usr/local/bin, distro installs to /usr/bi? +sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ +``` +
+
Fedora Install Steps + +``` +sudo dnf install -y gcc make git ripgrep fd-find unzip neovim +``` +
+ +
Arch Install Steps + +``` +sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim +``` +
+ diff --git a/init.lua b/init.lua index 63f193baf0e..09313572ae2 100644 --- a/init.lua +++ b/init.lua @@ -128,6 +128,9 @@ vim.opt.undofile = true -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term vim.opt.ignorecase = true vim.opt.smartcase = true +vim.opt.smartindent = true +vim.opt.spell = true +vim.opt.spelllang = en, programming -- Keep signcolumn on by default vim.opt.signcolumn = 'yes' @@ -281,6 +284,13 @@ require('lazy').setup({ branch = 'harpoon2', dependencies = { 'nvim-lua/plenary.nvim' }, }, + { + 'psliwka/vim-dirtytalk', + build = ':DirtytalkUpdate', + config = function() + vim.opt.spelllang = { 'en', 'programming' } + end, + }, -- Start Copilot -- { diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua new file mode 100644 index 00000000000..c7670abd26c --- /dev/null +++ b/lua/custom/plugins/init.lua @@ -0,0 +1,5 @@ +-- Yok can add your own plugins here or in other files in this directory! +-- I promise not to create any merge conflicts in this directory :) +-- +-- See the kickstart.nvim README for more information +return {} From 01a0c168a351f8d68ef7baea26d85ee87196c68c Mon Sep 17 00:00:00 2001 From: Ekshef Date: Mon, 9 Jun 2025 11:41:00 -0700 Subject: [PATCH 4/5] vim terminal working --- init.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/init.lua b/init.lua index 09313572ae2..b6efa71038d 100644 --- a/init.lua +++ b/init.lua @@ -157,6 +157,11 @@ vim.opt.inccommand = 'split' -- Show which line your cursor is on vim.opt.cursorline = true +-- set default tab stop and shiftwitdth so we dont' get 8 space tabs +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 + -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 @@ -218,6 +223,24 @@ vim.api.nvim_create_autocmd('TextYankPost', { end, }) +vim.api.nvim_create_autocmd('TermOpen', { + group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }), + callback = function() + vim.opt.number = false + vim.opt.relativenumber = false + end, +}) + +local job_id = 0 + +vim.keymap.set('n', 'st', function() + vim.cmd.vnew() + vim.cmd.term() + vim.cmd.wincmd 'J' + vim.api.nvim_win_set_height(0, 15) + job_id = vim.bo.channel +end, { desc = 'Opens [S]mall [T]erminal' }) + -- [[ 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' From d9a8aebc78a5358d5b88100c587ade031ed9d72e Mon Sep 17 00:00:00 2001 From: Ekshef Date: Mon, 9 Jun 2025 21:07:53 -0700 Subject: [PATCH 5/5] added harpoon telescope toggle and config --- init.lua | 32 ++++++++++++++++++++++++++++++-- lua/custom/plugins/init.lua | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index b6efa71038d..8fcb237f110 100644 --- a/init.lua +++ b/init.lua @@ -223,6 +223,8 @@ vim.api.nvim_create_autocmd('TextYankPost', { end, }) +-- Start of nvim terminal + vim.api.nvim_create_autocmd('TermOpen', { group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }), callback = function() @@ -234,11 +236,13 @@ vim.api.nvim_create_autocmd('TermOpen', { local job_id = 0 vim.keymap.set('n', 'st', function() + local root = find_project_root() vim.cmd.vnew() vim.cmd.term() vim.cmd.wincmd 'J' vim.api.nvim_win_set_height(0, 15) job_id = vim.bo.channel + -- vim.fn.chansend(job_id, { 'cd ' .. root }) end, { desc = 'Opens [S]mall [T]erminal' }) -- [[ Install `lazy.nvim` plugin manager ]] @@ -272,7 +276,7 @@ require('lazy').setup({ -- with the first argument being the link and the following -- keys can be used to configure plugin behavior/loading/etc. -- - -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. + -- Use `opts = {}` to auomatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. -- -- Alternatively, use `config = function() ... end` for full control over the configuration. @@ -1117,9 +1121,33 @@ require('lazy').setup({ local harpoon = require 'harpoon' -- REQUIRED -harpoon:setup() +harpoon:setup {} -- REQUIRED +-- basic telescope configuration +local conf = require('telescope.config').values +local function toggle_telescope(harpoon_files) + local file_paths = {} + for _, item in ipairs(harpoon_files.items) do + table.insert(file_paths, item.value) + end + + require('telescope.pickers') + .new({}, { + prompt_title = 'Harpoon', + finder = require('telescope.finders').new_table { + results = file_paths, + }, + previewer = conf.file_previewer {}, + sorter = conf.generic_sorter {}, + }) + :find() +end + +vim.keymap.set('n', '', function() + toggle_telescope(harpoon:list()) +end, { desc = 'Open harpoon window' }) + vim.keymap.set('n', 'a', function() harpoon:list():add() end, { desc = 'Add file to harpoon list.' }) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index c7670abd26c..be0eb9d8d7a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,4 +1,4 @@ --- Yok can add your own plugins here or in other files in this directory! +-- You can add your own plugins here or in other files in this directory! -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information