Compare commits
3 Commits
89b095f985
...
3cd77b2bde
Author | SHA1 | Date | |
---|---|---|---|
3cd77b2bde | |||
24ae44560a | |||
094420a2c6 |
@ -1,30 +0,0 @@
|
||||
|
||||
print('lsp')
|
||||
|
||||
local lsp = require('lsp-zero').preset({})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
lsp.setup()
|
||||
|
||||
-- You need to setup `cmp` after lsp-zero
|
||||
local cmp = require('cmp')
|
||||
local cmp_action = require('lsp-zero').cmp_action()
|
||||
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
-- `Enter` key to confirm completion
|
||||
-- ['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||
|
||||
-- Ctrl+Space to trigger completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
|
||||
-- Navigate between snippet placeholder
|
||||
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||
}
|
||||
})
|
@ -10,11 +10,6 @@ vim.wo.relativenumber = true
|
||||
-- Enable mouse mode
|
||||
vim.o.mouse = 'a'
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
|
@ -67,6 +67,8 @@ key('n', '<leader>tc', ':tabnew<cr>', { desc = '[T]ab [c]reate' })
|
||||
key('n', '<leader>ts', ':tab split<cr>', { desc = '[T]ab [s]plit' })
|
||||
key('n', '<leader>tn', ':tabnext<cr>', { desc = '[T]ab [n]ext' })
|
||||
key('n', '<leader>tp', ':tabprevious<cr>', { desc = '[T]ab [p]revious' })
|
||||
key('n', '<leader>tf', ':tabfirst<cr>', { desc = '[T]ab [f]irst' })
|
||||
key('n', '<leader>tl', ':tablast<cr>', { desc = '[T]tab [l]ast' })
|
||||
|
||||
key('v', 'J', ":m '>+1<cr>gv=gv", { desc = "Move lines down" })
|
||||
key('v', 'K', ":m '<-2<cr>gv=gv", { desc = "Move lines up" })
|
||||
@ -139,7 +141,7 @@ for i = 1, 9, 1 do
|
||||
end
|
||||
|
||||
for i = 1, 9, 1 do
|
||||
key('n', '<leader>t' .. i, function()
|
||||
key('n', '<leader>T' .. i, function()
|
||||
require("harpoon.term").gotoTerminal(i)
|
||||
end, { desc = '[H]arpoon nav_file [' .. i .. ']' })
|
||||
end
|
||||
|
41
nvim/.config/nvim/lua/plugins/appearance.lua
Normal file
41
nvim/.config/nvim/lua/plugins/appearance.lua
Normal file
@ -0,0 +1,41 @@
|
||||
return {
|
||||
-- Colorscheme
|
||||
{
|
||||
'neanias/everforest-nvim',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("everforest").setup({
|
||||
background = 'hard',
|
||||
})
|
||||
vim.cmd.colorscheme 'everforest'
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
-- Statusline (see `:help lualine.txt`)
|
||||
'nvim-lualine/lualine.nvim',
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = 'everforest',
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Indentation guides (see `:help indent_blankline.txt`)
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
opts = {
|
||||
char = '┊',
|
||||
show_trailing_blankline_indent = false,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'norcalli/nvim-colorizer.lua',
|
||||
cmd = 'ColorizerToggle'
|
||||
},
|
||||
}
|
25
nvim/.config/nvim/lua/plugins/editing.lua
Normal file
25
nvim/.config/nvim/lua/plugins/editing.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
-- "gc" to comment visual regions/lines
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
opts = {}
|
||||
},
|
||||
|
||||
-- Undo browsing
|
||||
'mbbill/undotree',
|
||||
|
||||
|
||||
-- Tabstops autodetected
|
||||
'tpope/vim-sleuth',
|
||||
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end
|
||||
},
|
||||
|
||||
'ggandor/lightspeed.nvim',
|
||||
}
|
29
nvim/.config/nvim/lua/plugins/git.lua
Normal file
29
nvim/.config/nvim/lua/plugins/git.lua
Normal file
@ -0,0 +1,29 @@
|
||||
return {
|
||||
-- Git
|
||||
'tpope/vim-fugitive',
|
||||
|
||||
{
|
||||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
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' })
|
||||
vim.keymap.set('n', '<leader>sh', require('gitsigns').stage_hunk,
|
||||
{ buffer = bufnr, desc = '[S]tage [H]unk' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
@ -11,19 +11,6 @@ return {
|
||||
cmd = 'Telescope',
|
||||
},
|
||||
|
||||
-- Colorscheme
|
||||
{
|
||||
'neanias/everforest-nvim',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("everforest").setup({
|
||||
background = 'hard',
|
||||
})
|
||||
vim.cmd.colorscheme 'everforest'
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
dependencies = {
|
||||
@ -34,48 +21,6 @@ return {
|
||||
':TSUpdate'
|
||||
},
|
||||
|
||||
{
|
||||
-- Statusline (see `:help lualine.txt`)
|
||||
'nvim-lualine/lualine.nvim',
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = 'everforest',
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Indentation guides (see `:help indent_blankline.txt`)
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
opts = {
|
||||
char = '┊',
|
||||
show_trailing_blankline_indent = false,
|
||||
},
|
||||
},
|
||||
|
||||
-- "gc" to comment visual regions/lines
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
opts = {}
|
||||
},
|
||||
|
||||
{
|
||||
'norcalli/nvim-colorizer.lua',
|
||||
cmd = 'ColorizerToggle'
|
||||
},
|
||||
|
||||
-- Undo browsing
|
||||
'mbbill/undotree',
|
||||
|
||||
-- Git
|
||||
'tpope/vim-fugitive',
|
||||
|
||||
-- Tabstops autodetected
|
||||
'tpope/vim-sleuth',
|
||||
|
||||
{
|
||||
-- LSP Configuration & Plugins
|
||||
'neovim/nvim-lspconfig',
|
||||
@ -111,40 +56,6 @@ return {
|
||||
-- Show pending keybinds
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
|
||||
{
|
||||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
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' })
|
||||
vim.keymap.set('n', '<leader>sh', require('gitsigns').stage_hunk,
|
||||
{ buffer = bufnr, desc = '[S]tage [H]unk' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
keys = { '<C-_>', '<cmd>ToggleTerm<cr>', desc = 'Toggle term' },
|
||||
@ -155,8 +66,6 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
'ggandor/lightspeed.nvim',
|
||||
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
|
@ -9,6 +9,11 @@ return {
|
||||
local entry_string = table.concat(file_names, ', ')
|
||||
return string.format('%d: %s %s%s', tab_id, cwd, entry_string, is_current and ' <' or '')
|
||||
end,
|
||||
entry_ordinal = function(tab_id, buffer_ids, file_names, file_paths, is_current)
|
||||
local cwd = vim.fn.getcwd(-1, tab_id)
|
||||
local entry_string = table.concat(file_names, ', ')
|
||||
return string.format('%s %s', cwd, entry_string)
|
||||
end,
|
||||
}
|
||||
end
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user