mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-23 13:48:35 +02:00
Config Update
- Added a bunch of plugins - Added `minicyan` colorscheme
This commit is contained in:
parent
5bdde24dfb
commit
2080d9aa9c
8 changed files with 849 additions and 61 deletions
88
init.lua
88
init.lua
|
@ -1,5 +1,4 @@
|
|||
--[[
|
||||
|
||||
=====================================================================
|
||||
==================== READ THIS BEFORE CONTINUING ====================
|
||||
=====================================================================
|
||||
|
@ -91,7 +90,7 @@ 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
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
|
@ -102,7 +101,7 @@ vim.g.have_nerd_font = false
|
|||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- 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!
|
||||
vim.opt.mouse = 'a'
|
||||
|
@ -166,6 +165,17 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Return to Snacks.nvim Dashboard
|
||||
vim.keymap.set('n', '<leader>:q', '<cmd>lua Snacks.dashboard()<CR>', { desc = 'Return to Snacks.nvim Dashboard' })
|
||||
|
||||
-- Map <leader>i in visual mode to “increment every number‐occurrence per line”
|
||||
vim.keymap.set('v', '<leader>i', function()
|
||||
-- Step 1: let i = 0 over the visual range
|
||||
vim.cmd 'let i = 0'
|
||||
|
||||
-- Step 2: for each line in that same range, increment i and replace all \d+ with i
|
||||
vim.cmd 'g/^/ let i += 1 | s/\\d\\+/\\=i/ge'
|
||||
end, { noremap = true, silent = true })
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
|
@ -242,18 +252,18 @@ require('lazy').setup({
|
|||
-- require('gitsigns').setup({ ... })
|
||||
--
|
||||
-- See `:help gitsigns` to understand what the configuration keys do
|
||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
},
|
||||
},
|
||||
-- { -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
-- 'lewis6991/gitsigns.nvim',
|
||||
-- opts = {
|
||||
-- signs = {
|
||||
-- add = { text = '+' },
|
||||
-- change = { text = '~' },
|
||||
-- delete = { text = '_' },
|
||||
-- topdelete = { text = '‾' },
|
||||
-- changedelete = { text = '~' },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
|
||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
||||
--
|
||||
|
@ -458,8 +468,8 @@ require('lazy').setup({
|
|||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||
-- Mason must be loaded before its dependents so we need to set it up here.
|
||||
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
||||
{ 'williamboman/mason.nvim', opts = {} },
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
{ 'williamboman/mason.nvim', opts = {}, version = "^1.0.0" },
|
||||
{ 'williamboman/mason-lspconfig.nvim', version = "^1.0.0" },
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
|
||||
-- Useful status updates for LSP.
|
||||
|
@ -590,14 +600,14 @@ require('lazy').setup({
|
|||
})
|
||||
|
||||
-- Change diagnostic symbols in the sign column (gutter)
|
||||
-- if vim.g.have_nerd_font then
|
||||
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
|
||||
-- local diagnostic_signs = {}
|
||||
-- for type, icon in pairs(signs) do
|
||||
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
|
||||
-- end
|
||||
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
|
||||
-- end
|
||||
if vim.g.have_nerd_font then
|
||||
local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
|
||||
local diagnostic_signs = {}
|
||||
for type, icon in pairs(signs) do
|
||||
diagnostic_signs[vim.diagnostic.severity[type]] = icon
|
||||
end
|
||||
vim.diagnostic.config { signs = { text = diagnostic_signs } }
|
||||
end
|
||||
|
||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||
|
@ -618,7 +628,8 @@ require('lazy').setup({
|
|||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
pyright = {},
|
||||
hls = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
@ -659,12 +670,18 @@ require('lazy').setup({
|
|||
-- You can add other tools here that you want Mason to install
|
||||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
local ensure_installed_lsps = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
})
|
||||
vim.list_extend(ensure_installed_lsps, {
|
||||
'ruff',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
ensure_installed = ensure_installed_lsps,
|
||||
automatic_installation = false,
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
|
@ -843,13 +860,13 @@ require('lazy').setup({
|
|||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
'EdenEast/nightfox.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
vim.cmd.colorscheme 'minicyan'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
|
@ -876,7 +893,9 @@ require('lazy').setup({
|
|||
-- - sd' - [S]urround [D]elete [']quotes
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require('mini.surround').setup()
|
||||
|
||||
require('mini.align').setup()
|
||||
require('mini.sessions').setup()
|
||||
require('mini.colors').setup()
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
|
@ -931,18 +950,15 @@ 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.indent_line',
|
||||
-- require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.autopairs',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.autopairs',
|
||||
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
|
||||
-- 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.
|
||||
--
|
||||
-- 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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue