Arch fixes
This commit is contained in:
@@ -5,14 +5,38 @@ V = vim
|
|||||||
--- 1 --- Options --------
|
--- 1 --- Options --------
|
||||||
--------------------------
|
--------------------------
|
||||||
O = V.opt
|
O = V.opt
|
||||||
|
|
||||||
|
-- Show numebers. Relative numbers are useful if you want to jump up and down
|
||||||
|
-- using the <num>j or <num>k commands. But I prefer to use the <num>G command
|
||||||
O.number=true
|
O.number=true
|
||||||
O.relativenumber=true
|
O.relativenumber=false
|
||||||
|
O.cursorline=true
|
||||||
|
|
||||||
|
-- Pretty much the standard now-a-days.
|
||||||
O.tabstop=2
|
O.tabstop=2
|
||||||
O.shiftwidth=2
|
O.shiftwidth=2
|
||||||
O.expandtab=true
|
O.expandtab=true
|
||||||
O.preserveindent=true
|
O.preserveindent=true
|
||||||
O.fillchars = { eob = " " }
|
|
||||||
O.termguicolors=true
|
O.termguicolors=true
|
||||||
|
O.showmode=false
|
||||||
|
O.signcolumn="yes"
|
||||||
|
|
||||||
|
-- Useful to search this way
|
||||||
|
O.ignorecase=true
|
||||||
|
O.smartcase=true
|
||||||
|
|
||||||
|
-- Maintain a history of undos so that I can undo even after restart
|
||||||
|
O.undofile=true
|
||||||
|
|
||||||
|
O.updatetime=300
|
||||||
|
O.timeoutlen=500
|
||||||
|
|
||||||
|
-- Keep atleast 15 lines at the bottom, don't scroll beyond
|
||||||
|
O.scrolloff=15
|
||||||
|
|
||||||
|
O.list = true
|
||||||
|
O.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||||
|
|
||||||
-- If running on WSL + Arch, uncomment this for faster startup
|
-- If running on WSL + Arch, uncomment this for faster startup
|
||||||
-- before setting the clipbard to unnamedplus
|
-- before setting the clipbard to unnamedplus
|
||||||
@@ -30,7 +54,6 @@ O.termguicolors=true
|
|||||||
--}
|
--}
|
||||||
O.clipboard='unnamedplus'
|
O.clipboard='unnamedplus'
|
||||||
|
|
||||||
|
|
||||||
--------------------------
|
--------------------------
|
||||||
---- Config Section -----
|
---- Config Section -----
|
||||||
--- 2 --- Leader ---------
|
--- 2 --- Leader ---------
|
||||||
@@ -84,7 +107,10 @@ packer.startup({function(u)
|
|||||||
'catppuccin/nvim', as = 'catppuccin'
|
'catppuccin/nvim', as = 'catppuccin'
|
||||||
}
|
}
|
||||||
|
|
||||||
-- LSP + Autocomplete
|
-- AI
|
||||||
|
u 'github/copilot.vim'
|
||||||
|
|
||||||
|
-- Dev
|
||||||
u 'williamboman/mason.nvim'
|
u 'williamboman/mason.nvim'
|
||||||
u 'williamboman/mason-lspconfig.nvim'
|
u 'williamboman/mason-lspconfig.nvim'
|
||||||
u 'neovim/nvim-lspconfig'
|
u 'neovim/nvim-lspconfig'
|
||||||
@@ -92,6 +118,11 @@ packer.startup({function(u)
|
|||||||
u 'hrsh7th/cmp-nvim-lsp'
|
u 'hrsh7th/cmp-nvim-lsp'
|
||||||
u 'hrsh7th/cmp-buffer'
|
u 'hrsh7th/cmp-buffer'
|
||||||
u 'hrsh7th/cmp-path'
|
u 'hrsh7th/cmp-path'
|
||||||
|
u 'numToStr/Comment.nvim'
|
||||||
|
u {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate',
|
||||||
|
}
|
||||||
|
|
||||||
-- Markdown
|
-- Markdown
|
||||||
u 'godlygeek/tabular'
|
u 'godlygeek/tabular'
|
||||||
@@ -100,9 +131,6 @@ packer.startup({function(u)
|
|||||||
u 'junegunn/goyo.vim'
|
u 'junegunn/goyo.vim'
|
||||||
u 'junegunn/limelight.vim'
|
u 'junegunn/limelight.vim'
|
||||||
|
|
||||||
-- Terminal
|
|
||||||
u 'akinsho/toggleterm.nvim'
|
|
||||||
|
|
||||||
-- File tree, telescope
|
-- File tree, telescope
|
||||||
u 'nvim-lua/plenary.nvim'
|
u 'nvim-lua/plenary.nvim'
|
||||||
u 'nvim-tree/nvim-web-devicons'
|
u 'nvim-tree/nvim-web-devicons'
|
||||||
@@ -117,7 +145,6 @@ packer.startup({function(u)
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Others
|
-- Others
|
||||||
-- u 'nvim-lualine/lualine.nvim'
|
|
||||||
u 'itchyny/lightline.vim'
|
u 'itchyny/lightline.vim'
|
||||||
u 'folke/which-key.nvim'
|
u 'folke/which-key.nvim'
|
||||||
|
|
||||||
@@ -132,7 +159,7 @@ config = {
|
|||||||
subcommands = {
|
subcommands = {
|
||||||
update = 'pull --ff-only --progress --rebase=false --force',
|
update = 'pull --ff-only --progress --rebase=false --force',
|
||||||
install = 'clone --depth %i --no-single-branch --progress',
|
install = 'clone --depth %i --no-single-branch --progress',
|
||||||
fetch = 'fetch --depth 999999 --progress --force',
|
fetch = 'fetch --depth 1 --progress --force',
|
||||||
checkout = 'checkout %s --',
|
checkout = 'checkout %s --',
|
||||||
update_branch = 'merge --ff-only @{u}',
|
update_branch = 'merge --ff-only @{u}',
|
||||||
current_branch = 'branch --show-current',
|
current_branch = 'branch --show-current',
|
||||||
@@ -153,8 +180,7 @@ config = {
|
|||||||
--- 5 --- Plugins conf----
|
--- 5 --- Plugins conf----
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
V.cmd("colorscheme catppuccin")
|
V.cmd("colorscheme catppuccin-frappe")
|
||||||
V.cmd("let g:lightline = {'colorscheme': 'catppuccin'}")
|
|
||||||
|
|
||||||
require('telescope').setup()
|
require('telescope').setup()
|
||||||
|
|
||||||
@@ -218,11 +244,6 @@ cmp.setup {
|
|||||||
local whichkey = require('which-key')
|
local whichkey = require('which-key')
|
||||||
whichkey.setup()
|
whichkey.setup()
|
||||||
|
|
||||||
local toggleterm = require('toggleterm')
|
|
||||||
toggleterm.setup({
|
|
||||||
direction = 'float',
|
|
||||||
})
|
|
||||||
|
|
||||||
-- vim-markdown
|
-- vim-markdown
|
||||||
V.cmd('let g:vim_markdown_folding_disabled = 1')
|
V.cmd('let g:vim_markdown_folding_disabled = 1')
|
||||||
V.cmd('let g:vim_markdown_conceal = 0')
|
V.cmd('let g:vim_markdown_conceal = 0')
|
||||||
@@ -244,6 +265,14 @@ V.cmd([[
|
|||||||
augroup END
|
augroup END
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
require('Comment').setup()
|
||||||
|
|
||||||
|
require('nvim-treesitter.configs').setup {
|
||||||
|
ensure_installed = { 'bash', 'c', 'html', 'html', 'markdown', 'vim', 'vimdoc', 'rust' },
|
||||||
|
auto_install = true,
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
}
|
||||||
|
|
||||||
--------------------------
|
--------------------------
|
||||||
---- Config Section -----
|
---- Config Section -----
|
||||||
@@ -265,6 +294,7 @@ end
|
|||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
local keymap = V.api.nvim_set_keymap
|
local keymap = V.api.nvim_set_keymap
|
||||||
|
local lua_keymap = V.keymap
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
keymap('n', '<leader>w', ':w<cr>', opts)
|
keymap('n', '<leader>w', ':w<cr>', opts)
|
||||||
@@ -321,6 +351,12 @@ keymap('n', 'gm', ':e main.md<cr>', opts)
|
|||||||
keymap('n', '<leader>g', ':Goyo<cr>', opts)
|
keymap('n', '<leader>g', ':Goyo<cr>', opts)
|
||||||
keymap('n', '<leader>l', ':Limelight!! 0.9<cr>', opts)
|
keymap('n', '<leader>l', ':Limelight!! 0.9<cr>', opts)
|
||||||
|
|
||||||
|
-- Diagnostics
|
||||||
|
lua_keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||||
|
lua_keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||||
|
lua_keymap.set('n', '<leader>ed', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||||
|
lua_keymap.set('n', '<leader>fd', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||||
|
|
||||||
-- Neovide
|
-- Neovide
|
||||||
if V.g.neovide then
|
if V.g.neovide then
|
||||||
keymap('n', '<leader>ff', ':lua V.g.neovide_fullscreen = true<cr>', opts)
|
keymap('n', '<leader>ff', ':lua V.g.neovide_fullscreen = true<cr>', opts)
|
||||||
|
|||||||
Reference in New Issue
Block a user