@ -17,7 +17,9 @@ Kickstart.nvim is a template for your own configuration.
a guide . One possible example :
- https : // learnxinyminutes.com / docs / lua /
And then you can explore or search through ` : help lua - guide `
- https : // neovim.io / doc / user / lua - guide.html
Kickstart Guide :
@ -93,7 +95,7 @@ require('lazy').setup({
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ ' j-hui/fidget.nvim ' , opts = { } } ,
{ ' j-hui/fidget.nvim ' , tag = ' legacy ' , opts = { } } ,
-- Additional lua configuration, makes nvim stuff amazing!
' folke/neodev.nvim ' ,
@ -119,7 +121,7 @@ require('lazy').setup({
-- Useful plugin to show you pending keybinds.
{ ' folke/which-key.nvim ' , opts = { } } ,
{
-- Adds git rel e ated signs to the gutter, as well as utilities for managing changes
-- Adds git rel ated signs to the gutter, as well as utilities for managing changes
' lewis6991/gitsigns.nvim ' ,
opts = {
-- See `:help gitsigns.txt`
@ -131,18 +133,35 @@ require('lazy').setup({
changedelete = { text = ' ~ ' } ,
} ,
on_attach = function ( bufnr )
vim.keymap . set ( ' n ' , ' [c ' , require ( ' gitsigns ' ) . prev_hunk , { buffer = bufnr , desc = ' Go to Previous Hunk' } )
vim.keymap . set ( ' n ' , ' ]c ' , require ( ' gitsigns ' ) . next_hunk , { buffer = bufnr , desc = ' Go to Next Hunk' } )
vim.keymap . set ( ' n ' , ' <leader>gp ' , require ( ' gitsigns ' ) . prev_hunk , { buffer = bufnr , desc = ' [ G] o to [ P] revious Hunk' } )
vim.keymap . set ( ' n ' , ' <leader>gn ' , require ( ' gitsigns ' ) . next_hunk , { buffer = bufnr , desc = ' [ G] o to [ N] ext Hunk' } )
vim.keymap . set ( ' n ' , ' <leader>ph ' , require ( ' gitsigns ' ) . preview_hunk , { buffer = bufnr , desc = ' [P]review [H]unk ' } )
end ,
} ,
} ,
-- Theme related configs go here
require ' kickstart.plugins.theme ' ,
{
-- Theme inspired by Atom
' navarasu/onedark.nvim ' ,
priority = 1000 ,
config = function ( )
vim.cmd . colorscheme ' onedark '
end ,
} ,
-- Status line related configs go here
require ' kickstart.plugins.statusline ' ,
{
-- Set lualine as statusline
' nvim-lualine/lualine.nvim ' ,
-- See `:help lualine.txt`
opts = {
options = {
icons_enabled = false ,
theme = ' onedark ' ,
component_separators = ' | ' ,
section_separators = ' ' ,
} ,
} ,
} ,
{
-- Add indentation guides even on blank lines
@ -159,19 +178,24 @@ require('lazy').setup({
{ ' numToStr/Comment.nvim ' , opts = { } } ,
-- Fuzzy Finder (files, lsp, etc)
{ ' nvim-telescope/telescope.nvim ' , branch = ' 0.1.x ' , dependencies = { ' nvim-lua/plenary.nvim ' } } ,
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
{
' nvim-telescope/telescope-fzf-native.nvim ' ,
-- NOTE: If you are having trouble with this installation,
-- refer to the README for telescope-fzf-native for more instructions.
build = ' make ' ,
cond = function ( )
return vim.fn . executable ' make ' == 1
end ,
' nvim-telescope/telescope.nvim ' ,
branch = ' 0.1.x ' ,
dependencies = {
' nvim-lua/plenary.nvim ' ,
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
{
' nvim-telescope/telescope-fzf-native.nvim ' ,
-- NOTE: If you are having trouble with this installation,
-- refer to the README for telescope-fzf-native for more instructions.
build = ' make ' ,
cond = function ( )
return vim.fn . executable ' make ' == 1
end ,
} ,
} ,
} ,
{
@ -189,12 +213,13 @@ require('lazy').setup({
-- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug',
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
-- up-to-date with whatever is in the kickstart repo.
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
--
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
{ import = ' custom.plugins ' } ,
-- { import = 'custom.plugins' } ,
} , { } )
-- [[ Setting options ]]
@ -221,7 +246,7 @@ vim.o.breakindent = true
-- Save undo history
vim.o . undofile = true
-- Case insensitive searching UNLESS / C or capital in search
-- Case -insensitive searching UNLESS \ C or capital in search
vim.o . ignorecase = true
vim.o . smartcase = true
@ -230,7 +255,6 @@ vim.wo.signcolumn = 'yes'
-- Decrease update time
vim.o . updatetime = 250
vim.o . timeout = true
vim.o . timeoutlen = 300
-- Set completeopt to have a better completion experience
@ -304,7 +328,7 @@ require('nvim-treesitter.configs').setup {
auto_install = false ,
highlight = { enable = true } ,
indent = { enable = true , disable = { ' python ' } } ,
indent = { enable = true } ,
incremental_selection = {
enable = true ,
keymaps = {
@ -416,12 +440,16 @@ end
--
-- Add any additional override configuration in the following tables. They will be passed to
-- the `settings` field of the server config. You must look up that documentation yourself.
--
-- If you want to override the default filetypes that your language server will attach to you can
-- define the property 'filetypes' to the map in question.
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- tsserver = {},
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
lua_ls = {
Lua = {
@ -453,8 +481,9 @@ mason_lspconfig.setup_handlers {
capabilities = capabilities ,
on_attach = on_attach ,
settings = servers [ server_name ] ,
filetypes = ( servers [ server_name ] or { } ) . filetypes ,
}
end ,
end
}
-- [[ Configure nvim-cmp ]]