first setup try
This commit is contained in:
parent
3338d39206
commit
fbc2216234
336
init.lua
336
init.lua
|
|
@ -1,110 +1,15 @@
|
||||||
--[[
|
|
||||||
|
|
||||||
=====================================================================
|
|
||||||
==================== READ THIS BEFORE CONTINUING ====================
|
|
||||||
=====================================================================
|
|
||||||
======== .-----. ========
|
|
||||||
======== .----------------------. | === | ========
|
|
||||||
======== |.-""""""""""""""""""-.| |-----| ========
|
|
||||||
======== || || | === | ========
|
|
||||||
======== || KICKSTART.NVIM || |-----| ========
|
|
||||||
======== || || | === | ========
|
|
||||||
======== || || |-----| ========
|
|
||||||
======== ||:Tutor || |:::::| ========
|
|
||||||
======== |'-..................-'| |____o| ========
|
|
||||||
======== `"")----------------(""` ___________ ========
|
|
||||||
======== /::::::::::| |::::::::::\ \ no mouse \ ========
|
|
||||||
======== /:::========| |==hjkl==:::\ \ required \ ========
|
|
||||||
======== '""""""""""""' '""""""""""""' '""""""""""' ========
|
|
||||||
======== ========
|
|
||||||
=====================================================================
|
|
||||||
=====================================================================
|
|
||||||
|
|
||||||
What is Kickstart?
|
|
||||||
|
|
||||||
Kickstart.nvim is *not* a distribution.
|
|
||||||
|
|
||||||
Kickstart.nvim is a starting point for your own configuration.
|
|
||||||
The goal is that you can read every line of code, top-to-bottom, understand
|
|
||||||
what your configuration is doing, and modify it to suit your needs.
|
|
||||||
|
|
||||||
Once you've done that, you can start exploring, configuring and tinkering to
|
|
||||||
make Neovim your own! That might mean leaving Kickstart just the way it is for a while
|
|
||||||
or immediately breaking it into modular pieces. It's up to you!
|
|
||||||
|
|
||||||
If you don't know anything about Lua, I recommend taking some time to read through
|
|
||||||
a guide. One possible example which will only take 10-15 minutes:
|
|
||||||
- https://learnxinyminutes.com/docs/lua/
|
|
||||||
|
|
||||||
After understanding a bit more about Lua, you can use `:help lua-guide` as a
|
|
||||||
reference for how Neovim integrates Lua.
|
|
||||||
- :help lua-guide
|
|
||||||
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
|
|
||||||
|
|
||||||
Kickstart Guide:
|
|
||||||
|
|
||||||
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
|
|
||||||
|
|
||||||
If you don't know what this means, type the following:
|
|
||||||
- <escape key>
|
|
||||||
- :
|
|
||||||
- Tutor
|
|
||||||
- <enter key>
|
|
||||||
|
|
||||||
(If you already know the Neovim basics, you can skip this step.)
|
|
||||||
|
|
||||||
Once you've completed that, you can continue working through **AND READING** the rest
|
|
||||||
of the kickstart init.lua.
|
|
||||||
|
|
||||||
Next, run AND READ `:help`.
|
|
||||||
This will open up a help window with some basic information
|
|
||||||
about reading, navigating and searching the builtin help documentation.
|
|
||||||
|
|
||||||
This should be the first place you go to look when you're stuck or confused
|
|
||||||
with something. It's one of my favorite Neovim features.
|
|
||||||
|
|
||||||
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
|
|
||||||
which is very useful when you're not exactly sure of what you're looking for.
|
|
||||||
|
|
||||||
I have left several `:help X` comments throughout the init.lua
|
|
||||||
These are hints about where to find more information about the relevant settings,
|
|
||||||
plugins or Neovim features used in Kickstart.
|
|
||||||
|
|
||||||
NOTE: Look for lines like this
|
|
||||||
|
|
||||||
Throughout the file. These are for you, the reader, to help you understand what is happening.
|
|
||||||
Feel free to delete them once you know what you're doing, but they should serve as a guide
|
|
||||||
for when you are first encountering a few different constructs in your Neovim config.
|
|
||||||
|
|
||||||
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
|
||||||
|
|
||||||
I hope you enjoy your Neovim journey,
|
|
||||||
- TJ
|
|
||||||
|
|
||||||
P.S. You can delete this when you're done too. It's your config now! :)
|
|
||||||
--]]
|
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
|
||||||
-- See `:help mapleader`
|
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
vim.g.mapleader = ' '
|
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 nerd font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- line numbers
|
||||||
-- See `:help vim.o`
|
|
||||||
-- NOTE: You can change these options as you wish!
|
|
||||||
-- For more options, you can see `:help option-list`
|
|
||||||
|
|
||||||
-- Make line numbers default
|
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
vim.o.relativenumber = true
|
||||||
-- Experiment for yourself to see if you like it!
|
|
||||||
-- vim.o.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.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
-- Don't show the mode, since it's already in the status line
|
-- Don't show the mode, since it's already in the status line
|
||||||
|
|
@ -118,47 +23,44 @@ vim.schedule(function()
|
||||||
vim.o.clipboard = 'unnamedplus'
|
vim.o.clipboard = 'unnamedplus'
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Enable break indent
|
-- Tab size
|
||||||
|
vim.o.tabstop = 3
|
||||||
|
vim.o.shiftwidth = 3
|
||||||
|
|
||||||
|
-- enable break indent
|
||||||
vim.o.breakindent = true
|
vim.o.breakindent = true
|
||||||
|
|
||||||
-- Save undo history
|
-- save undo history
|
||||||
vim.o.undofile = true
|
vim.o.undofile = true
|
||||||
|
|
||||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
-- case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
vim.o.ignorecase = true
|
vim.o.ignorecase = true
|
||||||
vim.o.smartcase = true
|
vim.o.smartcase = true
|
||||||
|
|
||||||
-- Keep signcolumn on by default
|
-- keep signcolumn on by default
|
||||||
vim.o.signcolumn = 'yes'
|
vim.o.signcolumn = 'yes'
|
||||||
|
|
||||||
-- Decrease update time
|
-- decrease update time
|
||||||
vim.o.updatetime = 250
|
vim.o.updatetime = 250
|
||||||
|
|
||||||
-- Decrease mapped sequence wait time
|
-- decrease mapped sequence wait time
|
||||||
vim.o.timeoutlen = 300
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
-- Configure how new splits should be opened
|
-- configure how new splits should be opened
|
||||||
vim.o.splitright = true
|
vim.o.splitright = true
|
||||||
vim.o.splitbelow = true
|
vim.o.splitbelow = true
|
||||||
|
|
||||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
-- sets how neovim will display certain whitespace characters in the editor.
|
||||||
-- See `:help 'list'`
|
|
||||||
-- and `:help 'listchars'`
|
|
||||||
--
|
|
||||||
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
|
|
||||||
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
|
|
||||||
-- See `:help lua-options`
|
|
||||||
-- and `:help lua-options-guide`
|
|
||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||||
|
|
||||||
-- Preview substitutions live, as you type!
|
-- preview substitutions live, as you type!
|
||||||
vim.o.inccommand = 'split'
|
vim.o.inccommand = 'split'
|
||||||
|
|
||||||
-- Show which line your cursor is on
|
-- show which line your cursor is on
|
||||||
vim.o.cursorline = true
|
vim.o.cursorline = true
|
||||||
|
|
||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
-- minimal number of screen lines to keep above and below the cursor.
|
||||||
vim.o.scrolloff = 10
|
vim.o.scrolloff = 10
|
||||||
|
|
||||||
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
||||||
|
|
@ -184,16 +86,15 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
||||||
-- or just use <C-\><C-n> to exit terminal mode
|
-- or just use <C-\><C-n> to exit terminal mode
|
||||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||||
|
|
||||||
-- TIP: Disable arrow keys in normal mode
|
-- Disable arrow keys in normal mode
|
||||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h 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', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k 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', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
-- Keybinds to make split navigation easier.
|
-- keybinds to make split navigation easier.
|
||||||
-- Use CTRL+<hjkl> to switch between windows
|
-- CTRL+<hjkl> to switch between windows
|
||||||
--
|
-- `:help wincmd` for a list of all window commands
|
||||||
-- See `:help wincmd` for a list of all window commands
|
|
||||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||||
|
|
@ -378,41 +279,20 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- useful for getting pretty icons, but requires a Nerd Font.
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
|
||||||
-- it can fuzzy find! It's more than just a "file finder", it can search
|
|
||||||
-- many different aspects of Neovim, your workspace, LSP, and more!
|
|
||||||
--
|
|
||||||
-- The easiest way to use Telescope, is to start by doing something like:
|
-- The easiest way to use Telescope, is to start by doing something like:
|
||||||
-- :Telescope help_tags
|
-- :Telescope help_tags
|
||||||
--
|
--
|
||||||
-- After running this command, a window will open up and you're able to
|
|
||||||
-- type in the prompt window. You'll see a list of `help_tags` options and
|
|
||||||
-- a corresponding preview of the help.
|
|
||||||
--
|
|
||||||
-- Two important keymaps to use while in Telescope are:
|
-- Two important keymaps to use while in Telescope are:
|
||||||
-- - Insert mode: <c-/>
|
-- - Insert mode: <c-/>
|
||||||
-- - Normal mode: ?
|
-- - Normal mode: ?
|
||||||
--
|
|
||||||
-- This opens a window that shows you all of the keymaps for the current
|
|
||||||
-- Telescope picker. This is really useful to discover what Telescope can
|
|
||||||
-- do as well as how to actually do it!
|
|
||||||
|
|
||||||
-- [[ Configure Telescope ]]
|
-- [[ Configure Telescope ]]
|
||||||
-- See `:help telescope` and `:help telescope.setup()`
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
require('telescope').setup {
|
require('telescope').setup {
|
||||||
-- You can put your default mappings / updates / etc. in here
|
|
||||||
-- All the info you're looking for is in `:help telescope.setup()`
|
|
||||||
--
|
|
||||||
-- defaults = {
|
|
||||||
-- mappings = {
|
|
||||||
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- pickers = {}
|
|
||||||
extensions = {
|
extensions = {
|
||||||
['ui-select'] = {
|
['ui-select'] = {
|
||||||
require('telescope.themes').get_dropdown(),
|
require('telescope.themes').get_dropdown(),
|
||||||
|
|
@ -420,7 +300,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Enable Telescope extensions if they are installed
|
-- enable telescope extensions if they are installed
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
pcall(require('telescope').load_extension, 'ui-select')
|
pcall(require('telescope').load_extension, 'ui-select')
|
||||||
|
|
||||||
|
|
@ -482,9 +362,20 @@ require('lazy').setup({
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- 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.
|
-- 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({})`
|
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
||||||
{ 'mason-org/mason.nvim', opts = {} },
|
{
|
||||||
|
'mason-org/mason.nvim',
|
||||||
|
opts = {
|
||||||
|
automatic_installation = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
'mason-org/mason-lspconfig.nvim',
|
'mason-org/mason-lspconfig.nvim',
|
||||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
@ -661,40 +552,26 @@ require('lazy').setup({
|
||||||
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
|
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
|
||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
|
|
||||||
-- Enable the following language servers
|
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
|
||||||
--
|
|
||||||
-- Add any additional override configuration in the following tables. Available keys are:
|
|
||||||
-- - cmd (table): Override the default command used to start the server
|
|
||||||
-- - filetypes (table): Override the default list of associated filetypes for the server
|
|
||||||
-- - 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 = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- Go
|
||||||
-- gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
golangci_lint_ls = {},
|
||||||
-- 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 = {},
|
|
||||||
--
|
|
||||||
|
|
||||||
|
-- Python
|
||||||
|
pyright = {},
|
||||||
|
|
||||||
|
-- Rust
|
||||||
|
rust_analyzer = {},
|
||||||
|
|
||||||
|
-- TypeScript / JavaScript
|
||||||
|
ts_ls = {},
|
||||||
|
|
||||||
|
-- Lua
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = { ... },
|
|
||||||
-- filetypes = { ... },
|
|
||||||
-- capabilities = {},
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
completion = {
|
completion = { callSnippet = 'Replace' },
|
||||||
callSnippet = 'Replace',
|
diagnostics = { globals = { 'vim' } },
|
||||||
},
|
|
||||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
||||||
-- diagnostics = { disable = { 'missing-fields' } },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -715,7 +592,12 @@ require('lazy').setup({
|
||||||
-- for you, so that they are available from within Neovim.
|
-- for you, so that they are available from within Neovim.
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
'stylua', -- Used to format Lua code
|
-- Lua
|
||||||
|
'stylua',
|
||||||
|
|
||||||
|
-- Go
|
||||||
|
'goimports',
|
||||||
|
'gofumpt',
|
||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
|
|
@ -738,7 +620,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
{ -- Autoformat
|
{ -- Autoformat
|
||||||
'stevearc/conform.nvim',
|
'stevearc/conform.nvim',
|
||||||
event = { 'BufWritePre' },
|
event = { 'VimEnter' },
|
||||||
cmd = { 'ConformInfo' },
|
cmd = { 'ConformInfo' },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
|
@ -768,6 +650,7 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
|
go = { 'goimports', 'gofumpt' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
|
|
@ -810,6 +693,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
'folke/lazydev.nvim',
|
'folke/lazydev.nvim',
|
||||||
},
|
},
|
||||||
|
|
||||||
--- @module 'blink.cmp'
|
--- @module 'blink.cmp'
|
||||||
--- @type blink.cmp.Config
|
--- @type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -876,28 +760,6 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- You can easily change to a different colorscheme.
|
|
||||||
-- Change the name of the colorscheme plugin below, and then
|
|
||||||
-- 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`.
|
|
||||||
'folke/tokyonight.nvim',
|
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
|
||||||
config = function()
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
|
||||||
require('tokyonight').setup {
|
|
||||||
styles = {
|
|
||||||
comments = { italic = false }, -- Disable italics in comments
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- 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'
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Highlight todo, notes, etc in comments
|
-- Highlight todo, notes, etc in comments
|
||||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||||
|
|
||||||
|
|
@ -938,20 +800,17 @@ require('lazy').setup({
|
||||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
main = 'nvim-treesitter.configs',
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
||||||
-- Autoinstall languages that are not installed
|
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
|
||||||
-- If you are experiencing weird indenting issues, add the language to
|
|
||||||
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
|
||||||
additional_vim_regex_highlighting = { 'ruby' },
|
additional_vim_regex_highlighting = { 'ruby' },
|
||||||
},
|
},
|
||||||
indent = { enable = true, disable = { 'ruby' } },
|
indent = { enable = true, disable = { 'ruby' } },
|
||||||
|
|
@ -964,32 +823,41 @@ require('lazy').setup({
|
||||||
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
},
|
},
|
||||||
|
|
||||||
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
{
|
||||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
'navarasu/onedark.nvim',
|
||||||
-- place them in the correct locations.
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
|
config = function()
|
||||||
|
require('onedark').setup {
|
||||||
|
style = 'light',
|
||||||
|
code_style = {
|
||||||
|
comments = 'none',
|
||||||
|
},
|
||||||
|
transparent = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable theme
|
||||||
|
require('onedark').load()
|
||||||
|
|
||||||
|
-- Override matchparen highlight
|
||||||
|
vim.api.nvim_create_autocmd('ColorScheme', {
|
||||||
|
pattern = '*',
|
||||||
|
callback = function()
|
||||||
|
vim.api.nvim_set_hl(0, 'MatchParen', { fg = '#000000', bg = '#E6F0FC' })
|
||||||
|
vim.api.nvim_set_hl(0, 'Visual', { fg = '#000000', bg = '#A8C6F4' })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
|
|
||||||
--
|
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
||||||
--
|
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- custom plugins ("lua/custom/plugins/*.lua")
|
||||||
-- This is the easiest way to modularize your config.
|
{ import = 'custom.plugins' },
|
||||||
--
|
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
||||||
-- { import = 'custom.plugins' },
|
|
||||||
--
|
|
||||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
|
||||||
-- Or use telescope!
|
|
||||||
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
|
|
||||||
-- you can continue same window with `<space>sr` which resumes last telescope search
|
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'andweeb/presence.nvim',
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require('presence').setup {
|
||||||
|
auto_update = true,
|
||||||
|
neovim_image_text = '(•̀⤙•́)',
|
||||||
|
main_image = 'file', -- ("neovim" or "file")
|
||||||
|
debounce_timeout = 10,
|
||||||
|
enable_line_number = true,
|
||||||
|
buttons = true,
|
||||||
|
show_time = true,
|
||||||
|
|
||||||
|
editing_text = 'Editing %s',
|
||||||
|
file_explorer_text = 'Browsing %s',
|
||||||
|
git_commit_text = 'Committing changes',
|
||||||
|
plugin_manager_text = 'Managing plugins',
|
||||||
|
reading_text = 'Reading %s',
|
||||||
|
workspace_text = 'Working on %s',
|
||||||
|
line_number_text = 'Line %s out of %s',
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
-- You can add your own plugins here or in other files in this directory!
|
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
|
||||||
--
|
|
||||||
-- See the kickstart.nvim README for more information
|
|
||||||
return {}
|
|
||||||
Loading…
Reference in New Issue