Nvim Luaification
This commit is contained in:
@@ -9,183 +9,21 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
local pluginTable = {
|
||||
"mattn/webapi-vim",
|
||||
"scrooloose/syntastic",
|
||||
"sheerun/vim-polyglot",
|
||||
{"catppuccin/nvim", lazy=true, name="catppuccin"},
|
||||
"simnalamburt/vim-mundo",
|
||||
"elkowar/yuck.vim",
|
||||
{"glacambre/firenvim",
|
||||
lazy = not vim.g.started_by_firenvim,
|
||||
build = function()
|
||||
vim.fn["firenvim#install"](0)
|
||||
end
|
||||
},
|
||||
--'honza/vim-snippets',
|
||||
--'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
'vim-scripts/indentLine.vim',
|
||||
'rhysd/git-messenger.vim',
|
||||
'rhysd/committia.vim',
|
||||
'junegunn/vim-easy-align',
|
||||
"preservim/nerdcommenter",
|
||||
"mg979/vim-visual-multi",
|
||||
"airblade/vim-gitgutter",
|
||||
{
|
||||
"folke/twilight.nvim",
|
||||
opts = {
|
||||
dimming = {
|
||||
alpha = 0.25, -- amount of dimming
|
||||
-- we try to get the foreground from the highlight groups or fallback color
|
||||
color = { "Normal", "#ffffff" },
|
||||
term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color
|
||||
inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer)
|
||||
},
|
||||
context = 10, -- amount of lines we will try to show around the current line
|
||||
treesitter = true, -- use treesitter when available for the filetype
|
||||
-- treesitter is used to automatically expand the visible text,
|
||||
-- but you can further control the types of nodes that should always be fully expanded
|
||||
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
||||
"function",
|
||||
"method",
|
||||
"table",
|
||||
"if_statement",
|
||||
},
|
||||
exclude = {}, -- exclude these filetypes
|
||||
}
|
||||
},
|
||||
{"folke/zen-mode.nvim", opts={
|
||||
window = {
|
||||
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||
-- height and width can be:
|
||||
-- * an absolute number of cells when > 1
|
||||
-- * a percentage of the width / height of the editor when <= 1
|
||||
-- * a function that returns the width or the height
|
||||
width = 120, -- width of the Zen window
|
||||
height = 1, -- height of the Zen window
|
||||
-- by default, no options are changed for the Zen window
|
||||
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
||||
options = {
|
||||
-- signcolumn = "no", -- disable signcolumn
|
||||
-- number = false, -- disable number column
|
||||
-- relativenumber = false, -- disable relative numbers
|
||||
-- cursorline = false, -- disable cursorline
|
||||
-- cursorcolumn = false, -- disable cursor column
|
||||
-- foldcolumn = "0", -- disable fold column
|
||||
-- list = false, -- disable whitespace characters
|
||||
},
|
||||
},
|
||||
plugins = {
|
||||
-- disable some global vim options (vim.o...)
|
||||
-- comment the lines to not apply the options
|
||||
options = {
|
||||
enabled = true,
|
||||
ruler = false, -- disables the ruler text in the cmd line area
|
||||
showcmd = false, -- disables the command in the last line of the screen
|
||||
-- you may turn on/off statusline in zen mode by setting 'laststatus'
|
||||
-- statusline will be shown only if 'laststatus' == 3
|
||||
laststatus = 0, -- turn off the statusline in zen mode
|
||||
},
|
||||
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
|
||||
gitsigns = { enabled = false }, -- disables git signs
|
||||
tmux = { enabled = false }, -- disables the tmux statusline
|
||||
-- this will change the font size on kitty when in zen mode
|
||||
-- to make this work, you need to set the following kitty options:
|
||||
-- - allow_remote_control socket-only
|
||||
-- - listen_on unix:/tmp/kitty
|
||||
kitty = {
|
||||
enabled = true,
|
||||
font = "+4", -- font size increment
|
||||
},
|
||||
-- this will change the font size on alacritty when in zen mode
|
||||
-- requires Alacritty Version 0.10.0 or higher
|
||||
-- uses `alacritty msg` subcommand to change font size
|
||||
alacritty = {
|
||||
enabled = false,
|
||||
font = "14", -- font size
|
||||
},
|
||||
-- this will change the font size on wezterm when in zen mode
|
||||
-- See alse also the Plugins/Wezterm section in this projects README
|
||||
wezterm = {
|
||||
enabled = false,
|
||||
-- can be either an absolute font size or the number of incremental steps
|
||||
font = "+4", -- (10% increase per step)
|
||||
},
|
||||
},
|
||||
}},
|
||||
--'vim-airline/vim-airline'
|
||||
--'vim-airline/vim-airline-themes'
|
||||
{'ctrlpvim/ctrlp.vim'},
|
||||
--'godlygeek/tabular'
|
||||
--'easymotion/vim-easymotion'
|
||||
--'nathanaelkane/vim-indent-guides'
|
||||
--'xuyuanp/nerdtree-git-plugin'
|
||||
--'bronson/vim-trailing-whitespace'
|
||||
--'tpope/vim-dadbod'
|
||||
--'tpope/vim-eunuch'
|
||||
--'tpope/vim-speeddating'
|
||||
--'tpope/vim-repeat'
|
||||
--'tpope/vim-rhubarb'
|
||||
--'tpope/vim-unimpaired'
|
||||
--'tpope/vim-abolish'
|
||||
--'tpope/vim-obsession'
|
||||
--'tpope/vim-fugitive'
|
||||
--'tpope/vim-surround'
|
||||
{
|
||||
'Exafunction/codeium.vim',
|
||||
event = 'BufEnter',
|
||||
config = function ()
|
||||
-- Change '<C-g>' here to any keycode you like.
|
||||
vim.keymap.set('i', '<C-g>', function () return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<c-;>', function() return vim.fn['codeium#CycleCompletions'](1) end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<c-,>', function() return vim.fn['codeium#CycleCompletions'](-1) end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<c-x>', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true })
|
||||
end
|
||||
},
|
||||
--'lambdalisue/suda.vim'
|
||||
{'nvim-treesitter/nvim-treesitter', build = ':TSUpdate'},
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
|
||||
'kosayoda/nvim-lightbulb',
|
||||
--'antoinemadec/FixCursorHold.nvim'
|
||||
'mhartington/formatter.nvim',
|
||||
'NvChad/nvim-colorizer.lua',
|
||||
|
||||
{'ms-jpq/chadtree', branch='chad', build='python3 -m chadtree deps'},
|
||||
{'ms-jpq/coq_nvim', branch='coq'},
|
||||
--" 9000+ Snippets
|
||||
{'ms-jpq/coq.artifacts', branch='artifacts'},
|
||||
{'ms-jpq/coq.thirdparty', branch='3p'},
|
||||
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'projekt0n/circles.nvim',
|
||||
|
||||
'nvim-neotest/nvim-nio',
|
||||
|
||||
--'uga-rosa/translate.nvim'
|
||||
--'mechatroner/rainbow_csv'
|
||||
--'christoomey/vim-system-copy'
|
||||
--'eandrju/cellular-automaton.nvim'
|
||||
--"neovim/nvim-lspconfig",
|
||||
--"'ranjithshegde/ccls.nvim'
|
||||
"mfussenegger/nvim-dap",
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"folke/neodev.nvim",
|
||||
"folke/which-key.nvim",
|
||||
{ "folke/neoconf.nvim", cmd = "Neoconf" },
|
||||
{"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
}, },
|
||||
}
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup(pluginTable)
|
||||
|
||||
--require("lazy").setup(pluginTable)
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "catppuccin" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
if vim.fn.has('persistent_undo') then
|
||||
local target_path = '/home/vectorkappa/.nvimundodir'
|
||||
local target_path = vim.fn.stdpath('data') ..'/.nvimundodir'
|
||||
if not vim.fn.isdirectory(target_path) then
|
||||
vim.fn.mkpath(target_path, { mode = 0700 }) -- Use mkpath for parent creation
|
||||
end
|
||||
@@ -199,10 +37,10 @@ vim.api.nvim_create_autocmd("StdinReadPre", {
|
||||
pattern = "*",
|
||||
command = "let s:std_in=1"
|
||||
})
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
pattern = "*",
|
||||
command = "if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | execute 'CHADopen' | execute 'cd '.argv()[0] | endif"
|
||||
})
|
||||
--vim.api.nvim_create_autocmd("VimEnter", {
|
||||
-- pattern = "*",
|
||||
-- command = "if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | execute 'Neotree current' | execute 'cd '.argv()[0] | endif"
|
||||
--})
|
||||
|
||||
|
||||
vim.g.airline_powerline_fonts = 1
|
||||
@@ -213,7 +51,7 @@ vim.g.airline_powerline_fonts = 1
|
||||
--vim.g.syntastic_python_checkers = ['bandit', 'python']
|
||||
|
||||
--" Keybinds
|
||||
vim.keymap.set('n', '<F2>', ':CHADopen<CR>',{noremap=true})
|
||||
vim.keymap.set('n', '<F2>', ':Neotree toggle<CR>',{noremap=true})
|
||||
vim.keymap.set('n', '<F3>', function() vim.lsp.buf.code_action() end,{noremap=true})
|
||||
vim.keymap.set('n', '<F4>', ':ZenMode<CR>',{noremap=true})
|
||||
--nnoremap <F2> :CHADopen<CR>
|
||||
@@ -331,6 +169,8 @@ vim.api.nvim_create_autocmd('VimEnter',
|
||||
vim.api.nvim_command("COQnow -s")
|
||||
end,
|
||||
})
|
||||
-- committia_open_only_vim_starting
|
||||
vim.g.committia_open_only_vim_starting = 1
|
||||
|
||||
--autocmd VimEnter * execute 'COQnow -s'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user