Update.
This commit is contained in:
parent
4a37a0a9b1
commit
7b670b6852
52
init.lua
52
init.lua
|
@ -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)
|
||||||
|
@ -75,7 +74,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
|
||||||
|
@ -91,14 +91,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`
|
||||||
|
@ -112,28 +114,22 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Theme inspired by Atom
|
{
|
||||||
'navarasu/onedark.nvim',
|
-- Set lualine as statusline
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
vim.cmd.colorscheme 'onedark'
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- 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 = '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`
|
||||||
|
@ -144,7 +140,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' } },
|
||||||
|
@ -162,7 +158,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',
|
||||||
|
@ -175,7 +172,7 @@ require('lazy').setup({
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||||
-- These are some example plugins that I've included in the kickstart repository.
|
-- These are some example plugins that I've included in the kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them.
|
-- Uncomment any of the lines below to enable them.
|
||||||
-- require 'kickstart.plugins.autoformat',
|
require 'kickstart.plugins.autoformat',
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
|
|
||||||
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
|
@ -288,7 +285,7 @@ vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { de
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' },
|
ensure_installed = { "lua", "vim", "help", "rust", "php", "javascript", "typescript", "vue", "css", "html", "scss" },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
@ -350,6 +347,12 @@ require('nvim-treesitter.configs').setup {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Open explorer
|
||||||
|
vim.keymap.set('n', '<leader>ep', vim.cmd.Ex)
|
||||||
|
|
||||||
|
-- Format
|
||||||
|
vim.keymap.set('n', '<leader>f', '<cmd>Format<CR>')
|
||||||
|
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
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" })
|
||||||
|
@ -468,15 +471,6 @@ cmp.setup {
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
},
|
},
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
|
|
|
@ -2,4 +2,12 @@
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {}
|
return {
|
||||||
|
'folke/tokyonight.nvim',
|
||||||
|
config = function()
|
||||||
|
require('tokyonight').setup({
|
||||||
|
transparent = true
|
||||||
|
})
|
||||||
|
vim.cmd [[colorscheme tokyonight-storm]]
|
||||||
|
end
|
||||||
|
}
|
Loading…
Reference in New Issue