mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 13:21:45 +00:00
Compare commits
16 Commits
584f9a50b6
...
4673abea85
Author | SHA1 | Date | |
---|---|---|---|
4673abea85 | |||
|
0ff7758cf4 | ||
|
b83b2b061c | ||
|
a02abdb161 | ||
|
c3127f1226 | ||
|
09093d4d90 | ||
|
c9122e89e3 | ||
|
de8986f7a8 | ||
|
e6710a461a | ||
|
23fc4e59dc | ||
|
b99af2d6a3 | ||
|
df166c3b8b | ||
|
94a93643ab | ||
|
b650582c60 | ||
|
38828dcaf7 | ||
|
b58666dd15 |
@ -46,7 +46,7 @@ vim.keymap.set('n', '<leader>cd', ':cd ', { desc = 'Prepare CMD for [C]hange [D]
|
|||||||
vim.keymap.set({ 'n', 'v' }, '<leader>go', ':Git<enter><C-w>o', { desc = '[G]it [O]pen' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>go', ':Git<enter><C-w>o', { desc = '[G]it [O]pen' })
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]]
|
-- [[ Basic Autocommands ]]
|
||||||
-- See :help lua-guide-autocommands
|
-- See `:help lua-guide-autocommands`
|
||||||
|
|
||||||
-- Highlight when yanking (copying) text
|
-- Highlight when yanking (copying) text
|
||||||
-- Try it with `yap` in normal mode
|
-- Try it with `yap` in normal mode
|
||||||
|
@ -6,15 +6,16 @@
|
|||||||
--]]
|
--]]
|
||||||
|
|
||||||
local check_version = function()
|
local check_version = function()
|
||||||
|
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
|
||||||
if not vim.version.cmp then
|
if not vim.version.cmp then
|
||||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
|
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
|
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
|
||||||
vim.health.ok(string.format("Neovim version is: '%s'", tostring(vim.version())))
|
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||||
else
|
else
|
||||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
|
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ return {
|
|||||||
-- Neovim. This is where `mason` and related plugins come into play.
|
-- Neovim. This is where `mason` and related plugins come into play.
|
||||||
--
|
--
|
||||||
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
||||||
-- and elegantly composed help section, :help lsp-vs-treesitter
|
-- and elegantly composed help section, `:help lsp-vs-treesitter`
|
||||||
|
|
||||||
-- This function gets run when an LSP attaches to a particular buffer.
|
-- This function gets run when an LSP attaches to a particular buffer.
|
||||||
-- That is to say, every time a new file is opened that is associated with
|
-- That is to say, every time a new file is opened that is associated with
|
||||||
@ -165,6 +165,9 @@ return {
|
|||||||
-- library = { vim.env.VIMRUNTIME },
|
-- library = { vim.env.VIMRUNTIME },
|
||||||
},
|
},
|
||||||
telemetry = { enable = false },
|
telemetry = { enable = false },
|
||||||
|
completion = {
|
||||||
|
callSnippet = 'Replace',
|
||||||
|
},
|
||||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||||
-- diagnostics = { disable = { 'missing-fields' } },
|
-- diagnostics = { disable = { 'missing-fields' } },
|
||||||
},
|
},
|
||||||
@ -196,15 +199,11 @@ return {
|
|||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
local server = servers[server_name] or {}
|
local server = servers[server_name] or {}
|
||||||
require('lspconfig')[server_name].setup {
|
-- This handles overriding only values explicitly passed
|
||||||
cmd = server.cmd,
|
-- by the server configuration above. Useful when disabling
|
||||||
settings = server.settings,
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
filetypes = server.filetypes,
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
-- This handles overriding only values explicitly passed
|
require('lspconfig')[server_name].setup(server)
|
||||||
-- by the server configuration above. Useful when disabling
|
|
||||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
|
||||||
capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}),
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ return {
|
|||||||
-- Better Around/Inside textobjects
|
-- Better Around/Inside textobjects
|
||||||
--
|
--
|
||||||
-- Examples:
|
-- Examples:
|
||||||
-- - va) - [V]isually select [A]round [)]parenthen
|
-- - va) - [V]isually select [A]round [)]paren
|
||||||
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
||||||
-- - ci' - [C]hange [I]nside [']quote
|
-- - ci' - [C]hange [I]nside [']quote
|
||||||
require('mini.ai').setup { n_lines = 500 }
|
require('mini.ai').setup { n_lines = 500 }
|
||||||
@ -20,8 +20,14 @@ return {
|
|||||||
-- Simple and easy statusline.
|
-- Simple and easy statusline.
|
||||||
-- You could remove this setup call if you don't like it,
|
-- You could remove this setup call if you don't like it,
|
||||||
-- and try some other statusline plugin
|
-- and try some other statusline plugin
|
||||||
require('mini.statusline').setup()
|
local statusline = require 'mini.statusline'
|
||||||
MiniStatusline.section_location = function()
|
statusline.setup()
|
||||||
|
|
||||||
|
-- You can configure sections in the statusline by overriding their
|
||||||
|
-- default behavior. For example, here we set the section for
|
||||||
|
-- cursor location to LINE:COLUMN
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
statusline.section_location = function()
|
||||||
return '%2l:%-2v'
|
return '%2l:%-2v'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
return {
|
return {
|
||||||
{ -- Fuzzy Finder (files, lsp, etc)
|
{ -- Fuzzy Finder (files, lsp, etc)
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
event = 'VeryLazy',
|
event = 'VimEnter',
|
||||||
branch = '0.1.x',
|
branch = '0.1.x',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- Highlight todo, notes, etc in comments
|
-- Highlight todo, notes, etc in comments
|
||||||
return {
|
return {
|
||||||
{ 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||||
}
|
}
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
@ -73,6 +73,11 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- There are additional nvim-treesitter modules that you can use to interact
|
||||||
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
|
--
|
||||||
|
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
||||||
--
|
--
|
||||||
-- For example, in the following configuration, we use:
|
-- For example, in the following configuration, we use:
|
||||||
-- event = 'VeryLazy'
|
-- event = 'VimEnter'
|
||||||
--
|
--
|
||||||
-- which loads which-key after all the UI elements are loaded. Events can be
|
-- which loads which-key before all the UI elements are loaded. Events can be
|
||||||
-- normal autocommands events (:help autocomd-events).
|
-- normal autocommands events (`:help autocmd-events`).
|
||||||
--
|
--
|
||||||
-- Then, because we use the `config` key, the configuration only runs
|
-- Then, because we use the `config` key, the configuration only runs
|
||||||
-- after the plugin has been loaded:
|
-- after the plugin has been loaded:
|
||||||
@ -16,7 +16,7 @@
|
|||||||
return {
|
return {
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
config = function() -- This is the function that runs, AFTER loading
|
config = function() -- This is the function that runs, AFTER loading
|
||||||
require('which-key').setup()
|
require('which-key').setup()
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
--
|
--
|
||||||
-- NOTE: Here is where you install your plugins.
|
-- NOTE: Here is where you install your plugins.
|
||||||
require('lazy').setup {
|
require('lazy').setup {
|
||||||
|
|
||||||
-- [[ Plugin Specs list ]]
|
-- [[ Plugin Specs list ]]
|
||||||
|
|
||||||
-- NOTE: First, some plugins that don't require any configuration
|
-- NOTE: First, some plugins that don't require any configuration
|
||||||
@ -81,7 +80,7 @@ require('lazy').setup {
|
|||||||
-- 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.
|
||||||
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ vim.opt.splitright = true
|
|||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
-- Sets how neovim will display certain whitespace in the editor.
|
-- Sets how neovim will display certain whitespace in the editor.
|
||||||
-- See :help 'list'
|
-- See `:help 'list'`
|
||||||
-- and :help 'listchars'
|
-- and `:help 'listchars'`
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.listchars = {
|
vim.opt.listchars = {
|
||||||
tab = '» ',
|
tab = '» ',
|
||||||
|
Loading…
Reference in New Issue
Block a user