feat(init) first small changes
added git commands in telescope changed themes to catpuccin added lsp for angular and ts
This commit is contained in:
parent
dbba54cfd8
commit
f4b6559d02
64
init.lua
64
init.lua
|
|
@ -190,6 +190,10 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
|||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Custom keybinds
|
||||
-- Use jk to exit edit mode
|
||||
vim.keymap.set('i', 'jk', '<Esc>')
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
|
|
@ -204,6 +208,20 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||
end,
|
||||
})
|
||||
|
||||
-- line number when inserting and then relative when inserting
|
||||
-- vim.api.nvim_win_set_config('number');
|
||||
vim.api.nvim_create_autocmd('InsertEnter', {
|
||||
desc = 'Set absolute line number when entering insert mode',
|
||||
pattern = '*',
|
||||
command = 'set norelativenumber',
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('InsertLeave', {
|
||||
desc = 'Set relative line number when exiting insert mode',
|
||||
pattern = '*',
|
||||
command = 'set relativenumber',
|
||||
})
|
||||
|
||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
|
|
@ -255,6 +273,12 @@ require('lazy').setup({
|
|||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = {
|
||||
virt_text_pos = 'right_align',
|
||||
delay = 500,
|
||||
ignore_whitespace = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -286,6 +310,7 @@ require('lazy').setup({
|
|||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
|
@ -353,6 +378,12 @@ require('lazy').setup({
|
|||
-- },
|
||||
-- },
|
||||
-- pickers = {}
|
||||
--
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = { width = 0.9 },
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(),
|
||||
|
|
@ -376,13 +407,17 @@ require('lazy').setup({
|
|||
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><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = '[G]it [S]tatus' })
|
||||
vim.keymap.set('n', '<leader>gc', builtin.git_commits, { desc = '[G]it [C]ommits' })
|
||||
vim.keymap.set('n', '<leader>gb', builtin.git_branches, { desc = '[G]it [B]ranches' })
|
||||
vim.keymap.set('n', '<leader>t', builtin.treesitter, { desc = '[T]ree sitter' })
|
||||
|
||||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
previewer = true,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
|
||||
|
|
@ -548,8 +583,8 @@ require('lazy').setup({
|
|||
-- https://github.com/pmizio/typescript-tools.nvim
|
||||
--
|
||||
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||
-- tsserver = {},
|
||||
--
|
||||
tsserver = {},
|
||||
angularls = {},
|
||||
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
|
|
@ -735,13 +770,24 @@ require('lazy').setup({
|
|||
--
|
||||
-- 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.
|
||||
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'
|
||||
-- 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'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
-- vim.cmd.hi 'Comment gui=none'
|
||||
-- end,
|
||||
},
|
||||
{
|
||||
'catppuccin/nvim',
|
||||
name = 'catppuccin',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Load the colorscheme here
|
||||
vim.cmd.colorscheme 'catppuccin-frappe'
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
end,
|
||||
|
|
|
|||
Loading…
Reference in New Issue