|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
--[[
|
|
|
|
|
|
|
|
|
|
=====================================================================
|
|
|
|
|
==================== READ THIS BEFORE CONTINUING ====================
|
|
|
|
|
=====================================================================
|
|
|
|
|
======== .-----. ========
|
|
|
|
|
======== .----------------------. | === | ========
|
|
|
|
|
=====================================================================
|
|
|
|
|
==================== READ THIS BEFORE CONTINUING ====================
|
|
|
|
|
=====================================================================
|
|
|
|
|
======== .-----. ========
|
|
|
|
|
======== .----------------------. | === | ========
|
|
|
|
|
======== |.-""""""""""""""""""-.| |-----| ========
|
|
|
|
|
======== || || | === | ========
|
|
|
|
|
======== || KICKSTART.NVIM || |-----| ========
|
|
|
|
@ -91,13 +91,14 @@ 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`
|
|
|
|
|
-- NOTE: You can change these options as you wish!
|
|
|
|
|
-- For more options, you can see `:help option-list`
|
|
|
|
|
|
|
|
|
|
-- Relative line numbers
|
|
|
|
|
vim.wo.relativenumber = true
|
|
|
|
|
-- Make line numbers default
|
|
|
|
|
vim.opt.number = true
|
|
|
|
|
-- You can also add relative line numbers, to help with jumping.
|
|
|
|
@ -158,7 +159,12 @@ vim.opt.scrolloff = 10
|
|
|
|
|
|
|
|
|
|
-- [[ Basic Keymaps ]]
|
|
|
|
|
-- See `:help vim.keymap.set()`
|
|
|
|
|
|
|
|
|
|
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = 'Open Netrw Directory Listing' })
|
|
|
|
|
vim.keymap.set('i', 'jj', '<Esc>')
|
|
|
|
|
vim.keymap.set('i', 'kk', '<Esc>')
|
|
|
|
|
vim.keymap.set('i', 'jk', '<Esc>')
|
|
|
|
|
vim.keymap.set('n', 'B', '^')
|
|
|
|
|
vim.keymap.set('n', 'E', '$')
|
|
|
|
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
|
|
|
|
-- See `:help hlsearch`
|
|
|
|
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|
|
|
@ -175,10 +181,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
|
|
|
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
|
|
|
|
|
|
|
|
|
-- TIP: Disable arrow keys in normal mode
|
|
|
|
|
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
|
|
|
|
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
|
|
|
|
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
|
|
|
|
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
|
|
|
|
|
|
|
|
|
-- Keybinds to make split navigation easier.
|
|
|
|
|
-- Use CTRL+<hjkl> to switch between windows
|
|
|
|
@ -227,6 +233,20 @@ vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
--
|
|
|
|
|
-- NOTE: Here is where you install your plugins.
|
|
|
|
|
require('lazy').setup({
|
|
|
|
|
{ 'bluz71/vim-moonfly-colors', name = 'moonfly', lazy = false, priority = 1000 },
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
'Zeioth/neon.nvim',
|
|
|
|
|
opts = {
|
|
|
|
|
transparent = true,
|
|
|
|
|
dim_inactive = false,
|
|
|
|
|
styles = {
|
|
|
|
|
comments = { italic = true },
|
|
|
|
|
keywords = { italic = true },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
|
|
|
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
|
|
|
|
|
|
|
|
@ -447,22 +467,22 @@ require('lazy').setup({
|
|
|
|
|
opts = {
|
|
|
|
|
library = {
|
|
|
|
|
-- Load luvit types when the `vim.uv` word is found
|
|
|
|
|
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
|
|
|
|
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{ 'Bilal2453/luvit-meta', lazy = true },
|
|
|
|
|
{
|
|
|
|
|
-- Main LSP Configuration
|
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
|
dependencies = {
|
|
|
|
|
-- 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.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
|
|
|
|
'williamboman/mason-lspconfig.nvim',
|
|
|
|
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
|
|
|
|
|
|
|
|
|
-- Useful status updates for LSP.
|
|
|
|
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
|
|
|
|
{ 'j-hui/fidget.nvim', opts = {} },
|
|
|
|
|
|
|
|
|
|
-- Allows extra capabilities provided by nvim-cmp
|
|
|
|
@ -615,47 +635,44 @@ require('lazy').setup({
|
|
|
|
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
|
|
|
|
-- - settings (table): Override the default settings passed when initializing the server.
|
|
|
|
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
|
|
|
|
local servers = {
|
|
|
|
|
-- clangd = {},
|
|
|
|
|
-- gopls = {},
|
|
|
|
|
-- pyright = {},
|
|
|
|
|
-- rust_analyzer = {},
|
|
|
|
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
|
|
|
--
|
|
|
|
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
|
|
|
|
-- https://github.com/pmizio/typescript-tools.nvim
|
|
|
|
|
--
|
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
|
-- ts_ls = {},
|
|
|
|
|
--
|
|
|
|
|
local servers =
|
|
|
|
|
{
|
|
|
|
|
-- clangd = {},
|
|
|
|
|
-- gopls = {},
|
|
|
|
|
-- pyright = {},
|
|
|
|
|
-- rust_analyzer = {},
|
|
|
|
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
|
|
|
--
|
|
|
|
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
|
|
|
|
-- https://github.com/pmizio/typescript-tools.nvim
|
|
|
|
|
--
|
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
|
-- ts_ls = {},
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
lua_ls = {
|
|
|
|
|
-- cmd = { ... },
|
|
|
|
|
-- filetypes = { ... },
|
|
|
|
|
-- capabilities = {},
|
|
|
|
|
settings = {
|
|
|
|
|
Lua = {
|
|
|
|
|
completion = {
|
|
|
|
|
callSnippet = 'Replace',
|
|
|
|
|
lua_ls = {
|
|
|
|
|
-- cmd = { ... },
|
|
|
|
|
-- filetypes = { ... },
|
|
|
|
|
-- capabilities = {},
|
|
|
|
|
settings = {
|
|
|
|
|
Lua = {
|
|
|
|
|
completion = {
|
|
|
|
|
callSnippet = 'Replace',
|
|
|
|
|
},
|
|
|
|
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
|
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
|
|
|
},
|
|
|
|
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
|
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
-- Ensure the servers and tools above are installed
|
|
|
|
|
-- To check the current status of installed tools and/or manually install
|
|
|
|
|
-- other tools, you can run
|
|
|
|
|
-- :Mason
|
|
|
|
|
--
|
|
|
|
|
-- You can press `g?` for help in this menu.
|
|
|
|
|
require('mason').setup()
|
|
|
|
|
|
|
|
|
|
-- Ensure the servers and tools above are installed
|
|
|
|
|
--
|
|
|
|
|
-- To check the current status of installed tools and/or manually install
|
|
|
|
|
-- other tools, you can run
|
|
|
|
|
-- :Mason
|
|
|
|
|
--
|
|
|
|
|
-- You can press `g?` for help in this menu.
|
|
|
|
|
--
|
|
|
|
|
-- `mason` had to be setup earlier: to configure its options see the
|
|
|
|
|
-- `dependencies` table for `nvim-lspconfig` above.
|
|
|
|
|
--
|
|
|
|
|
-- 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 {})
|
|
|
|
@ -849,8 +866,7 @@ require('lazy').setup({
|
|
|
|
|
-- 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 'neon-netrunner-night'
|
|
|
|
|
-- You can configure highlights by doing something like:
|
|
|
|
|
vim.cmd.hi 'Comment gui=none'
|
|
|
|
|
end,
|
|
|
|
|