feat: add sessions
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
local cmd = vim.cmd
|
||||
|
||||
cmd [[
|
||||
augroup highlight_yank
|
||||
au!
|
||||
au TextYankPost * silent! lua vim.highlight.on_yank { timeout = 150 }
|
||||
augroup END
|
||||
]]
|
||||
local config_group = vim.api.nvim_create_augroup('Config', {})
|
||||
vim.api.nvim_create_autocmd({ 'TextYankPost' }, {
|
||||
group = config_group,
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
cmd [[
|
||||
augroup filetypedetect
|
||||
|
@@ -1,16 +1,16 @@
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local g = vim.g
|
||||
|
||||
local options = { noremap = true }
|
||||
local options = { noremap = true, silent = true }
|
||||
local remap = { noremap = false }
|
||||
|
||||
g.mapleader = " "
|
||||
|
||||
map("n", "<C-o>", ":Telescope find_files<CR>", options)
|
||||
map("n", "<C-f>", ":Telescope live_grep<CR>", options)
|
||||
map("n", "<C-o>", ":Telescope git_files<CR>", options)
|
||||
map("n", "<C-f>", ":lua require'telescope.builtin'.live_grep{ cwd = vim.fn.getcwd() }<CR>", options)
|
||||
map("n", "<C-p>", ":Telescope command_center<CR>", options)
|
||||
map("n", "<Shift>", "za", options)
|
||||
|
||||
vim.notify("keys")
|
||||
-- LSP Functionality
|
||||
map("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", options)
|
||||
map("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", options)
|
||||
@@ -36,7 +36,7 @@ map("n", "<A-Left>", ":bprevious<CR>", options);
|
||||
map("n", "<A-Right>", ":bnext<CR>", options);
|
||||
|
||||
-- Backspace Delete like Browser
|
||||
map('i', '<C-H>', '<Esc>caw', options)
|
||||
map('i', '<C-H>', '<Esc>dbxi', options)
|
||||
|
||||
-- Copy visual selection to keyboard
|
||||
map("v", "Y", '"+y', options)
|
||||
|
@@ -12,7 +12,7 @@ set.clipboard = "unnamedplus" -- Copy paste between vim and everything else
|
||||
set.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
|
||||
set.expandtab = true -- Converts tabs to spaces
|
||||
set.autoindent = true -- Good auto indent
|
||||
set.autochdir = true -- Your working directory will always be the same as your working directory
|
||||
set.autochdir = false -- Your working directory will always be the same as your working directory
|
||||
set.incsearch = true -- sets incremental search
|
||||
set.shell = "/bin/zsh" -- Set your shell to bash or zsh
|
||||
set.shortmess:append "sI" -- Disable nvim intro
|
||||
|
@@ -8,10 +8,13 @@ return require("packer").startup(
|
||||
use "nvim-lua/plenary.nvim"
|
||||
|
||||
-- Theming Section
|
||||
use "rktjmp/fwatch.nvim" -- Used to check dark/light theme
|
||||
use "EdenEast/nightfox.nvim"
|
||||
use "nvim-lualine/lualine.nvim"
|
||||
|
||||
-- Layout Plugins
|
||||
use "dstein64/nvim-scrollview" -- ScrollBars
|
||||
use "akinsho/nvim-toggleterm.lua"
|
||||
use { "folke/zen-mode.nvim", config = function() require("zen-mode").setup {} end }
|
||||
use "rcarriga/nvim-notify"
|
||||
use "kyazdani42/nvim-web-devicons"
|
||||
@@ -43,7 +46,6 @@ return require("packer").startup(
|
||||
use "neovim/nvim-lspconfig"
|
||||
use "hrsh7th/nvim-cmp"
|
||||
use "hrsh7th/cmp-nvim-lsp"
|
||||
use "hrsh7th/cmp-nvim-lua"
|
||||
use "hrsh7th/cmp-path"
|
||||
use "hrsh7th/cmp-calc"
|
||||
use "hrsh7th/cmp-buffer"
|
||||
@@ -52,20 +54,18 @@ return require("packer").startup(
|
||||
use "L3MON4D3/LuaSnip"
|
||||
use "saadparwaiz1/cmp_luasnip"
|
||||
use "williamboman/nvim-lsp-installer"
|
||||
use "brymer-meneses/grammar-guard.nvim"
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = ":TSUpdate"
|
||||
}
|
||||
|
||||
-- Autoformat
|
||||
use "lukas-reineke/lsp-format.nvim"
|
||||
|
||||
-- General Popup Window
|
||||
use "akinsho/nvim-toggleterm.lua"
|
||||
|
||||
use "rktjmp/fwatch.nvim"
|
||||
|
||||
use {
|
||||
'rmagatti/session-lens',
|
||||
requires = { 'rmagatti/auto-session', 'nvim-telescope/telescope.nvim' },
|
||||
config = function()
|
||||
require('session-lens').setup({ path_display = { 'shorten' } })
|
||||
end
|
||||
}
|
||||
-- Database Feature
|
||||
use "tpope/vim-dadbod"
|
||||
use "kristijanhusak/vim-dadbod-ui"
|
||||
|
Reference in New Issue
Block a user