Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 76 additions & 23 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
======== ========
=====================================================================
=====================================================================

What is Kickstart?

Kickstart.nvim is *not* a distribution.
Expand Down Expand Up @@ -89,7 +88,6 @@ P.S. You can delete this when you're done too. It's your config now! :)
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
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

Expand All @@ -102,7 +100,7 @@ vim.g.have_nerd_font = false
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim.o.relative number =true

vim.o.relativenumber = true

-- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vim.o.mouse='a'

Expand Down Expand Up @@ -159,7 +157,7 @@ vim.o.inccommand = 'split'
vim.o.cursorline = true

-- Minimal number of screen lines to keep above and below the cursor.
vim.o.scrolloff = 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with this

vim.o.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)
Expand All @@ -185,10 +183,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exit terminal mode


-- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h!!!"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h!!"CR')

-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1!!"')

-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k!!"CR')

-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j!!"CR')

vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')

-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
Expand All @@ -205,6 +203,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })

vim.keymap.set('n', '<C-e>', ':Explore<CR>', { desc = 'Open file manager' })

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Open file manager'


-- Support for russian keyboard layout in normal mode <https://neovim.io/doc/user/russian.html>
vim.o.langmap =
'ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USA ENGLISH


-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`

Expand Down Expand Up @@ -247,7 +251,7 @@ rtp:prepend(lazypath)
-- NOTE: Here is where you install your plugins.
require('lazy').setup({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

('Lazy').setup({

-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detective tab stop and shiftwidth automatically

{ 'NMAC427/guess-indent.nvim', opts = {} }, -- Detect tabstop and shiftwidth automatically

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I no longer have a MacBook Pro I only have a iPad 12.9" (4th generation) and this iPhone 17 pro max


-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
Expand Down Expand Up @@ -412,7 +416,14 @@ require('lazy').setup({
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
-- pickers = {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{}

pickers = {
find_files = {
hidden = true,
file_ignore_patterns = { '%.git/' },
no_ignore = true,
no_ignore_parent = true,
},
},
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
Expand Down Expand Up @@ -472,6 +483,7 @@ require('lazy').setup({
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
vim.fn.expand '~/.luarocks/share/lua/5.3/',
},
},
},
Expand Down Expand Up @@ -672,8 +684,13 @@ require('lazy').setup({
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
gopls = {},
tofu_ls = {},
marksman = {},
bashls = {},
jsonls = {},
yamlls = {},
ruff = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
Expand Down Expand Up @@ -720,7 +737,15 @@ require('lazy').setup({
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

require('mason-lspconfig').setup {
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install whatever I need to get this done. I don't know what any of this stuff means

ensure_installed = {
'gopls',
'yamlls',
'jsonls',
'solargraph',
'bashls',
'lua_ls',
'ruff',
}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
automatic_installation = false,
handlers = {
function(server_name)
Expand Down Expand Up @@ -768,6 +793,7 @@ require('lazy').setup({
end,
formatters_by_ft = {
lua = { 'stylua' },
go = { 'gofmt' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
Expand Down Expand Up @@ -799,12 +825,12 @@ require('lazy').setup({
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
opts = {},
},
Expand Down Expand Up @@ -851,12 +877,23 @@ require('lazy').setup({
-- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 },
-- Recommended to avoid unnecessary request <https://github.com/milanglacier/minuet-ai.nvim?tab=readme-ov-file#blink-cmp-setup>
trigger = { prefetch_on_insert = false },
},

sources = {
default = { 'lsp', 'path', 'snippets', 'lazydev' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
-- minuet = {
-- name = 'minuet',
-- -- module = 'minuet.blink',
-- -- async = true,
-- -- -- Should match minuet.config.request_timeout * 1000,
-- -- -- since minuet.config.request_timeout is in seconds
-- timeout_ms = 3000,
-- score_offset = 50, -- Gives minuet higher priority among suggestions
-- },
},
},

Expand Down Expand Up @@ -944,7 +981,23 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'go',
'yaml',
'json',
'python',
},
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
Expand Down Expand Up @@ -973,9 +1026,9 @@ 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
Expand All @@ -984,7 +1037,7 @@ require('lazy').setup({
-- 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!
Expand Down
7 changes: 7 additions & 0 deletions lua/custom/plugins/autopairs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = true,
-- use opts = {} for passing setup options
-- this is equivalent to setup({}) function
}
13 changes: 13 additions & 0 deletions lua/custom/plugins/cheatsheet.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return {
'sudormrfbin/cheatsheet.nvim',

requires = {
{ 'nvim-telescope/telescope.nvim' },
{ 'nvim-lua/popup.nvim' },
{ 'nvim-lua/plenary.nvim' },
},
config = function()
require('cheatsheet').setup()
end,
vim.keymap.set('n', '<leader>sc', ':Cheatsheet<CR>', { desc = '[S]earch in [C]eatsheet' }),
}
70 changes: 70 additions & 0 deletions lua/custom/plugins/golang.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
return {
{
'olexsmir/gopher.nvim',
ft = 'go',
-- branch = "develop"
-- (optional) updates the plugin's dependencies on each update
build = function()
vim.cmd.GoInstallDeps()
end,
---@module "gopher"
---@type gopher.Config
opts = {},
config = function()
require('gopher').setup {
-- log level, you might consider using DEBUG or TRACE for debugging the plugin
log_level = vim.log.levels.INFO,

-- timeout for running internal commands
timeout = 2000,

-- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync)
installer_timeout = 999999,

-- user specified paths to binaries
commands = {
go = 'go',
gomodifytags = 'gomodifytags',
gotests = 'gotests',
impl = 'impl',
iferr = 'iferr',
},
gotests = {
-- a default template that gotess will use.
-- gotets doesn't have template named `default`, we use it to represent absence of the provided template.
template = 'default',

-- path to a directory containing custom test code templates
template_dir = nil,

-- use named tests(map with test name as key) in table tests(slice of structs by default)
named = false,
},
gotag = {
transform = 'snakecase',

-- default tags to add to struct fields
default_tag = 'json',

-- default tag option added struct fields, set to nil to disable
-- e.g: `option = "json=omitempty,xml=omitempty`
option = nil,
},
iferr = {
-- choose a custom error message, nil to use default
-- e.g: `message = 'fmt.Errorf("failed to %w", err)'`
message = nil,
},
json2go = {
-- command used to open interactive input.
-- e.g: `split`, `botright split`, `tabnew`
interactive_cmd = 'vsplit',

-- name of autogenerated struct
-- e.g: "MySuperCoolName"
type_name = nil,
},
}
end,
},
}
64 changes: 64 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
commit = 'e76cb03',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'
harpoon:setup {
settings = {
save_on_toggle = true,
mark_branch = true,
},
}

-- 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', '<C-h>', function()
toggle_telescope(harpoon:list())
end, { desc = 'Open harpoon window' })

vim.keymap.set('n', '<leader>ha', function()
harpoon:list():add()
end, { desc = '[H]arpoon [A]dd mark' })

vim.keymap.set('n', '<C-1>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-2>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<C-3>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<C-4>', function()
harpoon:list():select(4)
end)

-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<leader>hp', function()
harpoon:list():prev()
end, { desc = '[H]arpoon [P]rev item' })
vim.keymap.set('n', '<leader>hn', function()
harpoon:list():next()
end, { desc = '[H]arpoon [N]ext item' })
end,
}
Loading