mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-25 04:41:46 +00:00
Merge remote-tracking branch 'modular/master'
This commit is contained in:
commit
4673abea85
@ -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' })
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See :help lua-guide-autocommands
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
|
@ -6,15 +6,16 @@
|
||||
--]]
|
||||
|
||||
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
|
||||
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
|
||||
end
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
|
@ -35,7 +35,7 @@ return {
|
||||
-- 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
|
||||
-- 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.
|
||||
-- That is to say, every time a new file is opened that is associated with
|
||||
@ -165,6 +165,9 @@ return {
|
||||
-- library = { vim.env.VIMRUNTIME },
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
completion = {
|
||||
callSnippet = 'Replace',
|
||||
},
|
||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||
-- diagnostics = { disable = { 'missing-fields' } },
|
||||
},
|
||||
@ -196,15 +199,11 @@ return {
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
require('lspconfig')[server_name].setup {
|
||||
cmd = server.cmd,
|
||||
settings = server.settings,
|
||||
filetypes = server.filetypes,
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- 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 {}),
|
||||
}
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ return {
|
||||
-- Better Around/Inside textobjects
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]parenthen
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
@ -20,8 +20,14 @@ return {
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
require('mini.statusline').setup()
|
||||
MiniStatusline.section_location = function()
|
||||
local statusline = require 'mini.statusline'
|
||||
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'
|
||||
end
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
return {
|
||||
{ -- Fuzzy Finder (files, lsp, etc)
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VeryLazy',
|
||||
event = 'VimEnter',
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- Highlight todo, notes, etc in comments
|
||||
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
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -4,10 +4,10 @@
|
||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
||||
--
|
||||
-- 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
|
||||
-- normal autocommands events (:help autocomd-events).
|
||||
-- which loads which-key before all the UI elements are loaded. Events can be
|
||||
-- normal autocommands events (`:help autocmd-events`).
|
||||
--
|
||||
-- Then, because we use the `config` key, the configuration only runs
|
||||
-- after the plugin has been loaded:
|
||||
@ -16,7 +16,7 @@
|
||||
return {
|
||||
{ -- Useful plugin to show you pending keybinds.
|
||||
'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
|
||||
require('which-key').setup()
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
--
|
||||
-- NOTE: Here is where you install your plugins.
|
||||
require('lazy').setup {
|
||||
|
||||
-- [[ Plugin Specs list ]]
|
||||
|
||||
-- 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.
|
||||
--
|
||||
-- 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' },
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace in the editor.
|
||||
-- See :help 'list'
|
||||
-- and :help 'listchars'
|
||||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = {
|
||||
tab = '» ',
|
||||
|
Loading…
Reference in New Issue
Block a user