|
|
@ -35,7 +35,6 @@ I hope you enjoy your Neovim journey,
|
|
|
|
|
|
|
|
|
|
|
|
P.S. You can delete this when you're done too. It's your config now :)
|
|
|
|
P.S. You can delete this when you're done too. It's your config now :)
|
|
|
|
--]]
|
|
|
|
--]]
|
|
|
|
|
|
|
|
|
|
|
|
-- Set <space> as the leader key
|
|
|
|
-- Set <space> as the leader key
|
|
|
|
-- See `:help mapleader`
|
|
|
|
-- See `:help mapleader`
|
|
|
|
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
|
|
|
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
|
|
@ -79,7 +78,8 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
|
|
-- NOTE: This is where your plugins related to LSP can be installed.
|
|
|
|
-- NOTE: This is where your plugins related to LSP can be installed.
|
|
|
|
-- The configuration is done below. Search for lspconfig to find it below.
|
|
|
|
-- The configuration is done below. Search for lspconfig to find it below.
|
|
|
|
{ -- LSP Configuration & Plugins
|
|
|
|
{
|
|
|
|
|
|
|
|
-- LSP Configuration & Plugins
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
dependencies = {
|
|
|
|
dependencies = {
|
|
|
|
-- Automatically install LSPs to stdpath for neovim
|
|
|
|
-- Automatically install LSPs to stdpath for neovim
|
|
|
@ -95,14 +95,16 @@ require('lazy').setup({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{ -- Autocompletion
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Autocompletion
|
|
|
|
'hrsh7th/nvim-cmp',
|
|
|
|
'hrsh7th/nvim-cmp',
|
|
|
|
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' },
|
|
|
|
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
-- Useful plugin to show you pending keybinds.
|
|
|
|
-- Useful plugin to show you pending keybinds.
|
|
|
|
{ 'folke/which-key.nvim', opts = {} },
|
|
|
|
{ 'folke/which-key.nvim', opts = {} },
|
|
|
|
{ -- Adds git releated signs to the gutter, as well as utilities for managing changes
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
opts = {
|
|
|
|
opts = {
|
|
|
|
-- See `:help gitsigns.txt`
|
|
|
|
-- See `:help gitsigns.txt`
|
|
|
@ -115,29 +117,36 @@ require('lazy').setup({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
-- { -- Theme inspired by Atom
|
|
|
|
{ -- Theme inspired by Atom
|
|
|
|
-- 'navarasu/onedark.nvim',
|
|
|
|
'navarasu/onedark.nvim',
|
|
|
|
-- priority = 1000,
|
|
|
|
priority = 1000,
|
|
|
|
-- config = function()
|
|
|
|
|
|
|
|
-- vim.cmd.colorscheme 'onedark'
|
|
|
|
|
|
|
|
-- end,
|
|
|
|
|
|
|
|
-- },
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'folke/tokyonight.nvim', -- Theme
|
|
|
|
config = function()
|
|
|
|
config = function()
|
|
|
|
vim.cmd.colorscheme 'onedark'
|
|
|
|
vim.cmd [[colorscheme tokyonight-night]]
|
|
|
|
end,
|
|
|
|
end
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{ -- Set lualine as statusline
|
|
|
|
-- Set lualine as statusline
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
-- See `:help lualine.txt`
|
|
|
|
-- See `:help lualine.txt`
|
|
|
|
opts = {
|
|
|
|
opts = {
|
|
|
|
options = {
|
|
|
|
options = {
|
|
|
|
icons_enabled = false,
|
|
|
|
icons_enabled = false,
|
|
|
|
theme = 'onedark',
|
|
|
|
-- theme = 'onedark',
|
|
|
|
|
|
|
|
theme = 'tokyonight',
|
|
|
|
component_separators = '|',
|
|
|
|
component_separators = '|',
|
|
|
|
section_separators = '',
|
|
|
|
section_separators = '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{ -- Add indentation guides even on blank lines
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Add indentation guides even on blank lines
|
|
|
|
'lukas-reineke/indent-blankline.nvim',
|
|
|
|
'lukas-reineke/indent-blankline.nvim',
|
|
|
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
|
|
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
|
|
|
-- See `:help indent_blankline.txt`
|
|
|
|
-- See `:help indent_blankline.txt`
|
|
|
@ -148,7 +157,7 @@ require('lazy').setup({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
-- "gc" to comment visual regions/lines
|
|
|
|
-- "gc" to comment visual regions/lines
|
|
|
|
{ 'numToStr/Comment.nvim', opts = {} },
|
|
|
|
{ 'numToStr/Comment.nvim', opts = {} },
|
|
|
|
|
|
|
|
|
|
|
|
-- Fuzzy Finder (files, lsp, etc)
|
|
|
|
-- Fuzzy Finder (files, lsp, etc)
|
|
|
|
{ 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim' } },
|
|
|
|
{ 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim' } },
|
|
|
@ -166,7 +175,8 @@ require('lazy').setup({
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{ -- Highlight, edit, and navigate code
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Highlight, edit, and navigate code
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
dependencies = {
|
|
|
|
dependencies = {
|
|
|
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
|
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
|
@ -358,7 +368,7 @@ require('nvim-treesitter.configs').setup {
|
|
|
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = "Go to previous diagnostic message" })
|
|
|
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = "Go to previous diagnostic message" })
|
|
|
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = "Go to next diagnostic message" })
|
|
|
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = "Go to next diagnostic message" })
|
|
|
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = "Open floating diagnostic message" })
|
|
|
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = "Open floating diagnostic message" })
|
|
|
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = "Open diagnostics list" })
|
|
|
|
-- vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = "Open diagnostics list" })
|
|
|
|
|
|
|
|
|
|
|
|
-- LSP settings.
|
|
|
|
-- LSP settings.
|
|
|
|
-- This function gets run when an LSP connects to a particular buffer.
|
|
|
|
-- This function gets run when an LSP connects to a particular buffer.
|
|
|
@ -389,7 +399,7 @@ local on_attach = function(_, bufnr)
|
|
|
|
|
|
|
|
|
|
|
|
-- See `:help K` for why this keymap
|
|
|
|
-- See `:help K` for why this keymap
|
|
|
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
|
|
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
|
|
|
-- nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
|
|
|
nmap('<C-K>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
|
|
|
|
|
|
|
|
|
|
|
-- Lesser used LSP functionality
|
|
|
|
-- Lesser used LSP functionality
|
|
|
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
|
|
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
|
|
|