Enable Relative line number

Enable Nerd font icons
Add keymaps to switch buffers
Change color scheme to Gruvbox
Add Neoscroll plug-in
This commit is contained in:
Kosuke Fukuda 2025-04-11 00:26:29 +09:00
parent e947649cb0
commit 932d129ce7
1 changed files with 13 additions and 5 deletions

View File

@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal -- 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 ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.opt.number = true vim.opt.number = true
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- 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! -- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a' vim.opt.mouse = 'a'
@ -171,6 +171,10 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
-- Buffer switch keymaps
vim.keymap.set('n', '<C-n>', ':bnext<CR>')
vim.keymap.set('n', '<C-p>', ':bprev<CR>')
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- 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 -- 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. -- is not what someone will guess without a bit more experience.
@ -276,6 +280,10 @@ require('lazy').setup({
}, },
}, },
{ -- Add Neoscroll: a smooth scrolling plugin
'karb94/neoscroll.nvim',
opts = {},
},
-- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- NOTE: Plugins can also be configured to run Lua code when they are loaded.
-- --
-- This is often very useful to both group configuration, as well as handle -- This is often very useful to both group configuration, as well as handle
@ -898,11 +906,11 @@ require('lazy').setup({
-- change the command in the config to whatever the name of that colorscheme is. -- 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`. -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim', 'ellisonleao/gruvbox.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins. priority = 1000, -- Make sure to load this before all the other start plugins.
config = function() config = function()
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup { require('gruvbox').setup {
styles = { styles = {
comments = { italic = false }, -- Disable italics in comments comments = { italic = false }, -- Disable italics in comments
}, },
@ -911,7 +919,7 @@ require('lazy').setup({
-- Load the colorscheme here. -- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load -- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night' vim.cmd.colorscheme 'gruvbox'
end, end,
}, },