added plugins of harpoon, copilot(not activaited) as well as keymaps

This commit is contained in:
Ekshef 2025-06-05 20:31:22 -07:00
parent d350db2449
commit a722914de8
3 changed files with 129 additions and 18 deletions

View File

@ -220,7 +220,7 @@ sudo mkdir -p /opt/nvim-linux-x86_64
sudo chmod a+rX /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 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/ sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
``` ```
</details> </details>

141
init.lua
View File

@ -26,9 +26,7 @@ What is Kickstart?
Kickstart.nvim is a starting point for your own configuration. 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 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. 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
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 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! 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.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- I set this.
vim.keymap.set('n', '<leader>op', vim.cmd.Ex, { desc = 'Opens netRW' })
-- Set to true if you have a Nerd Font installed and selected in the terminal -- 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 = false
@ -102,7 +103,7 @@ vim.g.have_nerd_font = false
vim.opt.number = true vim.opt.number = true
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- 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! -- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a' 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 = '<C-Enter>',
-- next = '<C-j>',
-- prev = '<C-k>',
-- dismiss = '<C-e>',
-- },
-- },
-- panel = { enabled = false },
-- }
-- end,
-- },
-- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- 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 = {} }, { 'j-hui/fidget.nvim', opts = {} },
-- Allows extra capabilities provided by blink.cmp -- 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() config = function()
-- Brief aside: **What is LSP?** -- Brief aside: **What is LSP?**
@ -617,9 +674,6 @@ require('lazy').setup({
end end
end, end,
}) })
-- Diagnostic Config
-- See :help vim.diagnostic.Opts
vim.diagnostic.config { vim.diagnostic.config {
severity_sort = true, severity_sort = true,
float = { border = 'rounded', source = 'if_many' }, float = { border = 'rounded', source = 'if_many' },
@ -663,7 +717,15 @@ require('lazy').setup({
-- - settings (table): Override the default settings passed when initializing the server. -- - 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/ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = { local servers = {
-- clangd = {}, clangd = {
settings = {
clangd = {
completion = {
callSnippet = 'Replace',
},
},
},
},
-- gopls = {}, -- gopls = {},
-- pyright = {}, -- pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
@ -674,7 +736,6 @@ require('lazy').setup({
-- --
-- But for many setups, the LSP (`ts_ls`) will work just fine -- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {}, -- ts_ls = {},
--
lua_ls = { lua_ls = {
-- cmd = { ... }, -- cmd = { ... },
@ -727,6 +788,11 @@ require('lazy').setup({
} }
end, end,
}, },
{
'pmizio/typescript-tools.nvim',
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
opts = {},
},
{ -- Autoformat { -- Autoformat
'stevearc/conform.nvim', 'stevearc/conform.nvim',
@ -801,6 +867,7 @@ require('lazy').setup({
opts = {}, opts = {},
}, },
'folke/lazydev.nvim', 'folke/lazydev.nvim',
-- 'guixtaposition/blink-cmp-copilot',
}, },
--- @module 'blink.cmp' --- @module 'blink.cmp'
--- @type blink.cmp.Config --- @type blink.cmp.Config
@ -846,9 +913,17 @@ require('lazy').setup({
}, },
sources = { sources = {
--
--iadddcoopilottothiss
default = { 'lsp', 'path', 'snippets', 'lazydev' }, default = { 'lsp', 'path', 'snippets', 'lazydev' },
providers = { providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, 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() config = function()
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup { require('tokyonight').setup {
transparent = true,
styles = { styles = {
comments = { italic = false }, -- Disable italics in comments 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. -- 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). -- 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.indent_line',
-- require 'kickstart.plugins.lint', require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs', require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
vim.keymap.set('n', '<C-e>', ':Neotree toggle<CR>', { desc = 'open explore s s' }),
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- 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. -- 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. -- 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` -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope! -- Or use telescope!
@ -1004,5 +1081,39 @@ require('lazy').setup({
}, },
}) })
local harpoon = require 'harpoon'
-- REQUIRED
harpoon:setup()
-- REQUIRED
vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end, { desc = 'Add file to harpoon list.' })
vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = 'Toggle harpoon quick menu.' })
vim.keymap.set('n', '<leader>1', function()
harpoon:list():select(1)
end, { desc = 'Navigate to file at harpoon posistion 1' })
vim.keymap.set('n', '<leader>2', function()
harpoon:list():select(2)
end, { desc = 'Navigate to file at harpoon posistion 2' })
vim.keymap.set('n', '<leader>3', function()
harpoon:list():select(3)
end, { desc = 'Navigate to file at harpoon posistion 3' })
vim.keymap.set('n', '<leader>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', '<C-S-P>', function()
harpoon:list():prev()
end, { desc = 'Harpoon previous file' })
vim.keymap.set('n', '<C-S-N>', function()
harpoon:list():next()
end, { desc = 'Harpoon next file' })
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@ -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 :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information