-
Notifications
You must be signed in to change notification settings - Fork 44.9k
pull changes from upstream #1932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0436b64
1a5b06c
a1d899c
f4663f7
a03a25e
4dff548
b6f5415
8f69cbd
b79b7fc
24d1a3b
31733ab
7e2743d
daa4baa
168b40b
83202ac
532b8ce
131fc55
b0ce4d6
299f2e3
3258483
5233c6a
c7e0fbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,6 @@ | |
| ======== ======== | ||
| ===================================================================== | ||
| ===================================================================== | ||
|
|
||
| What is Kickstart? | ||
|
|
||
| Kickstart.nvim is *not* a distribution. | ||
|
|
@@ -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 | ||
|
|
||
|
|
@@ -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 | ||
| vim.o.relativenumber = true | ||
|
|
||
| -- Enable mouse mode, can be useful for resizing splits for example! | ||
| vim.o.mouse = 'a' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vim.o.mouse='a' |
||
|
|
@@ -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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
|
@@ -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' }) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. h!!!" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi there There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
@@ -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' }) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. USA ENGLISH |
||
|
|
||
| -- [[ Basic Autocommands ]] | ||
| -- See `:help lua-guide-autocommands` | ||
|
|
||
|
|
@@ -247,7 +251,7 @@ rtp:prepend(lazypath) | |
| -- NOTE: Here is where you install your plugins. | ||
| require('lazy').setup({ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
||
| { 'NMAC427/guess-indent.nvim', opts = {} }, -- Detect tabstop and shiftwidth automatically | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
@@ -412,7 +416,14 @@ require('lazy').setup({ | |
| -- i = { ['<c-enter>'] = 'to_fuzzy_refine' }, | ||
| -- }, | ||
| -- }, | ||
| -- pickers = {} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(), | ||
|
|
@@ -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/', | ||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -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 | ||
| -- | ||
|
|
@@ -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) | ||
|
||
| 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) | ||
|
|
@@ -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" }, | ||
| -- | ||
|
|
@@ -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 = {}, | ||
| }, | ||
|
|
@@ -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 | ||
| -- }, | ||
| }, | ||
| }, | ||
|
|
||
|
|
@@ -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 = { | ||
|
|
@@ -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 | ||
|
|
@@ -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! | ||
|
|
||
| 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 | ||
| } |
| 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' }), | ||
| } |
| 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, | ||
| }, | ||
| } |
| 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, | ||
| } |
There was a problem hiding this comment.
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