11--[[
2-
32=====================================================================
43==================== READ THIS BEFORE CONTINUING ====================
54=====================================================================
@@ -91,7 +90,7 @@ vim.g.mapleader = ' '
9190vim .g .maplocalleader = ' '
9291
9392-- Set to true if you have a Nerd Font installed and selected in the terminal
94- vim .g .have_nerd_font = false
93+ vim .g .have_nerd_font = true
9594
9695-- [[ Setting options ]]
9796-- See `:help vim.opt`
@@ -102,7 +101,7 @@ vim.g.have_nerd_font = false
102101vim .opt .number = true
103102-- You can also add relative line numbers, to help with jumping.
104103-- Experiment for yourself to see if you like it!
105- -- vim.opt.relativenumber = true
104+ vim .opt .relativenumber = true
106105
107106-- Enable mouse mode, can be useful for resizing splits for example!
108107vim .opt .mouse = ' a'
@@ -166,6 +165,17 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
166165-- Diagnostic keymaps
167166vim .keymap .set (' n' , ' <leader>q' , vim .diagnostic .setloclist , { desc = ' Open diagnostic [Q]uickfix list' })
168167
168+ -- Return to Snacks.nvim Dashboard
169+ vim .keymap .set (' n' , ' <leader>:q' , ' <cmd>lua Snacks.dashboard()<CR>' , { desc = ' Return to Snacks.nvim Dashboard' })
170+
171+ -- Map <leader>i in visual mode to “increment every number‐occurrence per line”
172+ vim .keymap .set (' v' , ' <leader>i' , function ()
173+ -- Step 1: let i = 0 over the visual range
174+ vim .cmd ' let i = 0'
175+
176+ -- Step 2: for each line in that same range, increment i and replace all \d+ with i
177+ vim .cmd ' g/^/ let i += 1 | s/\\ d\\ +/\\ =i/ge'
178+ end , { noremap = true , silent = true })
169179-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
170180-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
171181-- is not what someone will guess without a bit more experience.
@@ -242,18 +252,18 @@ require('lazy').setup({
242252 -- require('gitsigns').setup({ ... })
243253 --
244254 -- See `:help gitsigns` to understand what the configuration keys do
245- { -- Adds git related signs to the gutter, as well as utilities for managing changes
246- ' lewis6991/gitsigns.nvim' ,
247- opts = {
248- signs = {
249- add = { text = ' +' },
250- change = { text = ' ~' },
251- delete = { text = ' _' },
252- topdelete = { text = ' ‾' },
253- changedelete = { text = ' ~' },
254- },
255- },
256- },
255+ -- { -- Adds git related signs to the gutter, as well as utilities for managing changes
256+ -- 'lewis6991/gitsigns.nvim',
257+ -- opts = {
258+ -- signs = {
259+ -- add = { text = '+' },
260+ -- change = { text = '~' },
261+ -- delete = { text = '_' },
262+ -- topdelete = { text = '‾' },
263+ -- changedelete = { text = '~' },
264+ -- },
265+ -- },
266+ -- },
257267
258268 -- NOTE: Plugins can also be configured to run Lua code when they are loaded.
259269 --
@@ -458,8 +468,8 @@ require('lazy').setup({
458468 -- Automatically install LSPs and related tools to stdpath for Neovim
459469 -- Mason must be loaded before its dependents so we need to set it up here.
460470 -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
461- { ' williamboman/mason.nvim' , opts = {} },
462- ' williamboman/mason-lspconfig.nvim' ,
471+ { ' williamboman/mason.nvim' , opts = {}, version = " ^1.0.0 " },
472+ { ' williamboman/mason-lspconfig.nvim' , version = " ^1.0.0 " } ,
463473 ' WhoIsSethDaniel/mason-tool-installer.nvim' ,
464474
465475 -- Useful status updates for LSP.
@@ -590,14 +600,14 @@ require('lazy').setup({
590600 })
591601
592602 -- Change diagnostic symbols in the sign column (gutter)
593- -- if vim.g.have_nerd_font then
594- -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
595- -- local diagnostic_signs = {}
596- -- for type, icon in pairs(signs) do
597- -- diagnostic_signs[vim.diagnostic.severity[type]] = icon
598- -- end
599- -- vim.diagnostic.config { signs = { text = diagnostic_signs } }
600- -- end
603+ if vim .g .have_nerd_font then
604+ local signs = { ERROR = ' ' , WARN = ' ' , INFO = ' ' , HINT = ' ' }
605+ local diagnostic_signs = {}
606+ for type , icon in pairs (signs ) do
607+ diagnostic_signs [vim .diagnostic .severity [type ]] = icon
608+ end
609+ vim .diagnostic .config { signs = { text = diagnostic_signs } }
610+ end
601611
602612 -- LSP servers and clients are able to communicate to each other what features they support.
603613 -- By default, Neovim doesn't support everything that is in the LSP specification.
@@ -618,7 +628,8 @@ require('lazy').setup({
618628 local servers = {
619629 -- clangd = {},
620630 -- gopls = {},
621- -- pyright = {},
631+ pyright = {},
632+ hls = {},
622633 -- rust_analyzer = {},
623634 -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
624635 --
@@ -659,12 +670,18 @@ require('lazy').setup({
659670 -- You can add other tools here that you want Mason to install
660671 -- for you, so that they are available from within Neovim.
661672 local ensure_installed = vim .tbl_keys (servers or {})
673+ local ensure_installed_lsps = vim .tbl_keys (servers or {})
662674 vim .list_extend (ensure_installed , {
663675 ' stylua' , -- Used to format Lua code
664676 })
677+ vim .list_extend (ensure_installed_lsps , {
678+ ' ruff' ,
679+ })
665680 require (' mason-tool-installer' ).setup { ensure_installed = ensure_installed }
666681
667682 require (' mason-lspconfig' ).setup {
683+ ensure_installed = ensure_installed_lsps ,
684+ automatic_installation = false ,
668685 handlers = {
669686 function (server_name )
670687 local server = servers [server_name ] or {}
@@ -843,13 +860,13 @@ require('lazy').setup({
843860 -- change the command in the config to whatever the name of that colorscheme is.
844861 --
845862 -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
846- ' folke/tokyonight .nvim' ,
863+ ' EdenEast/nightfox .nvim' ,
847864 priority = 1000 , -- Make sure to load this before all the other start plugins.
848865 init = function ()
849866 -- Load the colorscheme here.
850867 -- Like many other themes, this one has different styles, and you could load
851868 -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
852- vim .cmd .colorscheme ' tokyonight-night '
869+ vim .cmd .colorscheme ' minicyan '
853870
854871 -- You can configure highlights by doing something like:
855872 vim .cmd .hi ' Comment gui=none'
@@ -876,7 +893,9 @@ require('lazy').setup({
876893 -- - sd' - [S]urround [D]elete [']quotes
877894 -- - sr)' - [S]urround [R]eplace [)] [']
878895 require (' mini.surround' ).setup ()
879-
896+ require (' mini.align' ).setup ()
897+ require (' mini.sessions' ).setup ()
898+ require (' mini.colors' ).setup ()
880899 -- Simple and easy statusline.
881900 -- You could remove this setup call if you don't like it,
882901 -- and try some other statusline plugin
@@ -931,18 +950,15 @@ require('lazy').setup({
931950 -- Here are some example plugins that I've included in the Kickstart repository.
932951 -- Uncomment any of the lines below to enable them (you will need to restart nvim).
933952 --
934- -- require 'kickstart.plugins.debug',
935- -- require 'kickstart.plugins.indent_line',
936- -- require 'kickstart.plugins.lint',
937- -- require 'kickstart.plugins.autopairs',
938- -- require 'kickstart.plugins.neo-tree',
939- -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
953+ require ' kickstart.plugins.debug' ,
954+ require ' kickstart.plugins.autopairs' ,
955+ require ' kickstart.plugins.gitsigns' , -- adds gitsigns recommend keymaps
940956
941957 -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
942958 -- This is the easiest way to modularize your config.
943959 --
944960 -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
945- -- { import = 'custom.plugins' },
961+ { import = ' custom.plugins' },
946962 --
947963 -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
948964 -- Or use telescope!
0 commit comments