Lazygit, vtsls, angularjs lsps, everforest color scheme, qol improvements
This commit is contained in:
parent
e947649cb0
commit
65f9b32fcb
76
init.lua
76
init.lua
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- 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!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
@ -163,6 +163,7 @@ vim.opt.confirm = true
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
vim.keymap.set('n', '<leader>Q', '<cmd>qa<cr>', { desc = 'Quit All' })
|
||||||
|
|
||||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||||
-- See `:help hlsearch`
|
-- See `:help hlsearch`
|
||||||
|
@ -338,6 +339,7 @@ require('lazy').setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
||||||
{ '<leader>d', group = '[D]ocument' },
|
{ '<leader>d', group = '[D]ocument' },
|
||||||
|
{ '<leader>g', group = '[G]it' },
|
||||||
{ '<leader>r', group = '[R]ename' },
|
{ '<leader>r', group = '[R]ename' },
|
||||||
{ '<leader>s', group = '[S]earch' },
|
{ '<leader>s', group = '[S]earch' },
|
||||||
{ '<leader>w', group = '[W]orkspace' },
|
{ '<leader>w', group = '[W]orkspace' },
|
||||||
|
@ -431,7 +433,9 @@ require('lazy').setup({
|
||||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
||||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
vim.keymap.set('n', '<leader>s.', function()
|
||||||
|
builtin.oldfiles { only_cwd = true }
|
||||||
|
end, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
|
||||||
-- Slightly advanced example of overriding default behavior and theme
|
-- Slightly advanced example of overriding default behavior and theme
|
||||||
|
@ -696,6 +700,44 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
vtsls = {
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
preferences = {
|
||||||
|
importModuleSpecifier = 'project-relative',
|
||||||
|
importModuleSpecifierPreference = 'relative',
|
||||||
|
importModuleSpecifierEnding = 'minimal',
|
||||||
|
},
|
||||||
|
inlayHints = {
|
||||||
|
parameterNames = { enabled = 'all' },
|
||||||
|
parameterTypes = { enabled = true },
|
||||||
|
variableTypes = { enabled = true },
|
||||||
|
propertyDeclarationTypes = { enabled = true },
|
||||||
|
functionLikeReturnTypes = { enabled = true },
|
||||||
|
enumMemberValues = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
angularls = {
|
||||||
|
capabilities = lsp_capabilities,
|
||||||
|
filetypes = { 'typescript', 'html', 'angular', 'htmlangular' },
|
||||||
|
root_dir = function(fname)
|
||||||
|
return require('lspconfig.util').root_pattern('angular.json', 'workspace.json', 'nx.json', 'package.json', 'tsconfig.base.json')(fname)
|
||||||
|
end,
|
||||||
|
on_new_config = function(new_config, new_root_dir)
|
||||||
|
new_config.cmd = {
|
||||||
|
'ngserver',
|
||||||
|
'--stdio',
|
||||||
|
'--tsProbeLocations',
|
||||||
|
new_root_dir,
|
||||||
|
'--ngProbeLocations',
|
||||||
|
new_root_dir,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
|
@ -898,20 +940,20 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- 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`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
'folke/tokyonight.nvim',
|
'neanias/everforest-nvim',
|
||||||
|
lazy = false,
|
||||||
|
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
config = function()
|
config = function()
|
||||||
---@diagnostic disable-next-line: missing-fields
|
require('everforest').setup {
|
||||||
require('tokyonight').setup {
|
background = 'medium',
|
||||||
styles = {
|
ui_contrast = 'low',
|
||||||
comments = { italic = false }, -- Disable italics in comments
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Load the colorscheme here.
|
-- Load the colorscheme here.
|
||||||
-- Like many other themes, this one has different styles, and you could load
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||||
vim.cmd.colorscheme 'tokyonight-night'
|
vim.cmd.colorscheme 'everforest'
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -955,6 +997,22 @@ require('lazy').setup({
|
||||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ -- LazyGit
|
||||||
|
'kdheepak/lazygit.nvim',
|
||||||
|
lazy = false,
|
||||||
|
cmd = {
|
||||||
|
'LazyGit',
|
||||||
|
'LazyGitConfig',
|
||||||
|
'LazyGitCurrentFile',
|
||||||
|
'LazyGitFilter',
|
||||||
|
'LazyGitFilterCurrentFile',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set('n', '<leader>gg', '<cmd>LazyGit<CR>', { desc = 'LazyGit' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
|
|
Loading…
Reference in New Issue