|
|
|
@ -91,7 +91,7 @@ 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`
|
|
|
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|
|
|
|
vim.opt.number = true
|
|
|
|
|
-- You can also add relative line numbers, to help with jumping.
|
|
|
|
|
-- Experiment for yourself to see if you like it!
|
|
|
|
|
-- vim.opt.relativenumber = true
|
|
|
|
|
vim.opt.relativenumber = true
|
|
|
|
|
|
|
|
|
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
|
|
|
|
vim.opt.mouse = 'a'
|
|
|
|
@ -243,18 +243,18 @@ require('lazy').setup({
|
|
|
|
|
-- require('gitsigns').setup({ ... })
|
|
|
|
|
--
|
|
|
|
|
-- See `:help gitsigns` to understand what the configuration keys do
|
|
|
|
|
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
|
opts = {
|
|
|
|
|
signs = {
|
|
|
|
|
add = { text = '+' },
|
|
|
|
|
change = { text = '~' },
|
|
|
|
|
delete = { text = '_' },
|
|
|
|
|
topdelete = { text = '‾' },
|
|
|
|
|
changedelete = { text = '~' },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
-- { -- Adds git related signs to the gutter, as well as utilities for managing changes
|
|
|
|
|
-- 'lewis6991/gitsigns.nvim',
|
|
|
|
|
-- opts = {
|
|
|
|
|
-- signs = {
|
|
|
|
|
-- add = { text = '+' },
|
|
|
|
|
-- change = { text = '~' },
|
|
|
|
|
-- delete = { text = '_' },
|
|
|
|
|
-- topdelete = { text = '‾' },
|
|
|
|
|
-- changedelete = { text = '~' },
|
|
|
|
|
-- },
|
|
|
|
|
-- },
|
|
|
|
|
-- },
|
|
|
|
|
|
|
|
|
|
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
|
|
|
|
--
|
|
|
|
@ -615,7 +615,40 @@ require('lazy').setup({
|
|
|
|
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
|
|
|
|
local servers = {
|
|
|
|
|
-- clangd = {},
|
|
|
|
|
-- gopls = {},
|
|
|
|
|
gopls = {
|
|
|
|
|
-- gofumpt = true,
|
|
|
|
|
-- codelenses = {
|
|
|
|
|
-- gc_details = false,
|
|
|
|
|
-- generate = true,
|
|
|
|
|
-- regenerate_cgo = true,
|
|
|
|
|
-- run_govulncheck = true,
|
|
|
|
|
-- test = true,
|
|
|
|
|
-- tidy = true,
|
|
|
|
|
-- upgrade_dependency = true,
|
|
|
|
|
-- vendor = true,
|
|
|
|
|
-- },
|
|
|
|
|
-- hints = {
|
|
|
|
|
-- assignVariableTypes = true,
|
|
|
|
|
-- compositeLiteralFields = true,
|
|
|
|
|
-- compositeLiteralTypes = true,
|
|
|
|
|
-- constantValues = true,
|
|
|
|
|
-- functionTypeParameters = true,
|
|
|
|
|
-- parameterNames = true,
|
|
|
|
|
-- rangeVariableTypes = true,
|
|
|
|
|
-- },
|
|
|
|
|
-- analyses = {
|
|
|
|
|
-- fieldalignment = true,
|
|
|
|
|
-- nilness = true,
|
|
|
|
|
-- unusedparams = true,
|
|
|
|
|
-- unusedwrite = true,
|
|
|
|
|
-- useany = true,
|
|
|
|
|
-- },
|
|
|
|
|
-- usePlaceholders = true,
|
|
|
|
|
-- completeUnimported = true,
|
|
|
|
|
-- staticcheck = true,
|
|
|
|
|
-- directoryFilters = { '-.git', '-.vscode', '-.idea', '-.vscode-test', '-node_modules' },
|
|
|
|
|
-- semanticTokens = true,
|
|
|
|
|
},
|
|
|
|
|
-- pyright = {},
|
|
|
|
|
-- rust_analyzer = {},
|
|
|
|
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
|
|
@ -656,6 +689,12 @@ require('lazy').setup({
|
|
|
|
|
local ensure_installed = vim.tbl_keys(servers or {})
|
|
|
|
|
vim.list_extend(ensure_installed, {
|
|
|
|
|
'stylua', -- Used to format Lua code
|
|
|
|
|
'prettierd',
|
|
|
|
|
'goimports',
|
|
|
|
|
'gofumpt',
|
|
|
|
|
'gomodifytags',
|
|
|
|
|
'impl',
|
|
|
|
|
'delve',
|
|
|
|
|
})
|
|
|
|
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
|
|
|
|
|
|
|
|
@ -708,6 +747,8 @@ require('lazy').setup({
|
|
|
|
|
end,
|
|
|
|
|
formatters_by_ft = {
|
|
|
|
|
lua = { 'stylua' },
|
|
|
|
|
yaml = { 'prettierd' },
|
|
|
|
|
go = { 'goimports', 'gofumpt' },
|
|
|
|
|
-- Conform can also run multiple formatters sequentially
|
|
|
|
|
-- python = { "isort", "black" },
|
|
|
|
|
--
|
|
|
|
@ -737,12 +778,12 @@ require('lazy').setup({
|
|
|
|
|
-- `friendly-snippets` contains a variety of premade snippets.
|
|
|
|
|
-- See the README about individual language/framework/plugin snippets:
|
|
|
|
|
-- https://github.com/rafamadriz/friendly-snippets
|
|
|
|
|
-- {
|
|
|
|
|
-- 'rafamadriz/friendly-snippets',
|
|
|
|
|
-- config = function()
|
|
|
|
|
-- require('luasnip.loaders.from_vscode').lazy_load()
|
|
|
|
|
-- end,
|
|
|
|
|
-- },
|
|
|
|
|
{
|
|
|
|
|
'rafamadriz/friendly-snippets',
|
|
|
|
|
config = function()
|
|
|
|
|
require('luasnip.loaders.from_vscode').lazy_load()
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'saadparwaiz1/cmp_luasnip',
|
|
|
|
@ -825,6 +866,7 @@ require('lazy').setup({
|
|
|
|
|
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
|
|
|
|
group_index = 0,
|
|
|
|
|
},
|
|
|
|
|
{ name = 'copilot' },
|
|
|
|
|
{ name = 'nvim_lsp' },
|
|
|
|
|
{ name = 'luasnip' },
|
|
|
|
|
{ name = 'path' },
|
|
|
|
@ -838,13 +880,14 @@ require('lazy').setup({
|
|
|
|
|
-- 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',
|
|
|
|
|
'catppuccin/nvim',
|
|
|
|
|
name = 'catppuccin',
|
|
|
|
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
|
|
|
|
init = function()
|
|
|
|
|
-- 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 'catppuccin-mocha'
|
|
|
|
|
|
|
|
|
|
-- You can configure highlights by doing something like:
|
|
|
|
|
vim.cmd.hi 'Comment gui=none'
|
|
|
|
@ -897,7 +940,24 @@ require('lazy').setup({
|
|
|
|
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
|
|
|
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
|
|
|
opts = {
|
|
|
|
|
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
|
|
|
|
ensure_installed = {
|
|
|
|
|
'bash',
|
|
|
|
|
'c',
|
|
|
|
|
'diff',
|
|
|
|
|
'go',
|
|
|
|
|
'gomod',
|
|
|
|
|
'gowork',
|
|
|
|
|
'gosum',
|
|
|
|
|
'html',
|
|
|
|
|
'lua',
|
|
|
|
|
'luadoc',
|
|
|
|
|
'markdown',
|
|
|
|
|
'markdown_inline',
|
|
|
|
|
'query',
|
|
|
|
|
'yaml',
|
|
|
|
|
'vim',
|
|
|
|
|
'vimdoc',
|
|
|
|
|
},
|
|
|
|
|
-- Autoinstall languages that are not installed
|
|
|
|
|
auto_install = true,
|
|
|
|
|
highlight = {
|
|
|
|
@ -926,12 +986,12 @@ require('lazy').setup({
|
|
|
|
|
-- 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.indent_line',
|
|
|
|
|
require 'kickstart.plugins.debug',
|
|
|
|
|
require 'kickstart.plugins.indent_line',
|
|
|
|
|
-- require 'kickstart.plugins.lint',
|
|
|
|
|
-- require 'kickstart.plugins.autopairs',
|
|
|
|
|
require 'kickstart.plugins.autopairs',
|
|
|
|
|
-- 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`
|
|
|
|
|
-- This is the easiest way to modularize your config.
|
|
|
|
|