Compare commits

..

No commits in common. "b96c09207810d0051334e97d5b9265334001410a" and "d465dd1e91496fe44344fc779c06c9aee7e739b9" have entirely different histories.

24 changed files with 466 additions and 477 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.json *.json
config/* packer_compiled.lua
lua/config/

View File

@ -1,6 +1,5 @@
# TODO # TODO
- [ ] config - [ ] config
- [ ] better autocomplete shortcuts
- [ ] better git integration - [ ] better git integration
- [ ] renew LaTeX configuration for Lazy
- [ ] set better key maps and options

View File

@ -0,0 +1,16 @@
require("lsp-format").setup {}
local on_attach = function(client)
require("lsp-format").on_attach(client)
-- ... custom code ...
end
require("lspconfig").bashls.setup { on_attach = on_attach }
require("lspconfig").clangd.setup { on_attach = on_attach }
require("lspconfig").julials.setup { on_attach = on_attach }
require("lspconfig").lua_ls.setup { on_attach = on_attach }
require("lspconfig").ltex.setup { on_attach = on_attach }
require("lspconfig").pylsp.setup { on_attach = on_attach }
require("lspconfig").texlab.setup { on_attach = on_attach }
require("lspconfig").zls.setup { on_attach = on_attach }

View File

@ -0,0 +1,7 @@
-- If you want insert `(` after select function or method item
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)

11
after/plugin/colors.lua Normal file
View File

@ -0,0 +1,11 @@
function ColorMyPencils(color)
color = color or "tokyonight-night"
vim.cmd.colorscheme(color)
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
ColorMyPencils()

View File

@ -0,0 +1,5 @@
CIFAR
MNIST
LeNet
MUL
BCNN

View File

@ -0,0 +1 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)

View File

@ -1,10 +1,10 @@
local mark = require("harpoon.mark") local mark = require("harpoon.mark")
local ui = require("harpoon.ui") local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file, { desc = "Harpoon: Mark File"}) vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu, { desc = "Toggle Harpoon Menu"}) vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(1) end) vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(2) end) vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-b>", function() ui.nav_file(3) end) vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-g>", function() ui.nav_file(4) end) vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)

122
after/plugin/lsp.lua Normal file
View File

@ -0,0 +1,122 @@
local lsp = require('lsp-zero').preset({})
lsp.on_attach(function(client, bufnr)
lsp.default_keymaps({ buffer = bufnr })
end)
-- Language servers
if (MY_OS == 'Linux')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'clangd',
'julials',
'lua_ls',
'ltex',
'pylsp',
'texlab',
--'zls'
})
elseif (MY_OS == 'FreeBSD')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'julials',
'pylsp',
})
else
print('Should never be here')
end
--[[
START LANGUAGE SERVERS CONFIG HERE!!!
]]
--
-- (Optional) Configure lua language server for neovim
require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
--require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({})
require('lspconfig').lua_ls.setup({
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { 'vim' },
neededFileStatus = {
["codestyle-check"] = "Any",
},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
format = {
enable = true,
-- Put format options here
-- NOTE: the value should be STRING!!
defaultConfig = {
indent_style = "space",
indent_size = "4",
}
},
},
},
})
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
local words = {}
for word in io.open(path, "r"):lines() do
table.insert(words, word)
end
require('lspconfig').ltex.setup({
settings = {
ltex = {
language = "en-GB",
dictionary = {
["en-GB"] = words,
},
},
},
})
-- source: https://rust-analyzer.github.io/manual.html#nvim-lsp
--require('lspconfig').rust_analyzer.setup({
-- on_attach = on_attach,
-- settings = {
-- ["rust-analyzer"] = {
-- inlayHints = {
-- closingBraceHints = true, -- Whether to show inlay hints after a closing } to indicate what item it belongs to.
-- }
-- }
-- }
--})
require('lspconfig').texlab.setup({})
require('lspconfig').zls.setup({})
--[[
END LANGUAGE SERVERS CONFIG HERE!!!
]]
--
lsp.setup()

View File

@ -1,59 +0,0 @@
require('neoclip').setup({
history = 1000,
enable_persistent_history = false,
length_limit = 1048576,
continuous_sync = false,
db_path = vim.fn.stdpath("data") .. "/databases/neoclip.sqlite3",
filter = nil,
preview = true,
prompt = nil,
default_register = '"',
default_register_macros = 'q',
enable_macro_history = true,
content_spec_column = false,
disable_keycodes_parsing = false,
on_select = {
move_to_front = false,
close_telescope = true,
},
on_paste = {
set_reg = false,
move_to_front = false,
close_telescope = true,
},
on_replay = {
set_reg = false,
move_to_front = false,
close_telescope = true,
},
on_custom_action = {
close_telescope = true,
},
keys = {
telescope = {
i = {
select = '<cr>',
paste = '<c-j>',
paste_behind = '<c-k>',
replay = '<c-q>', -- replay a macro
delete = '<c-d>', -- delete an entry
edit = '<c-e>', -- edit an entry
custom = {},
},
n = {
select = '<cr>',
paste = 'p',
--- It is possible to map to more than one key.
-- paste = { 'p', '<c-p>' },
paste_behind = 'P',
replay = 'q',
delete = 'd',
edit = 'e',
custom = {},
},
},
},
})
vim.keymap.set("n", "<leader>o", "<cmd>Telescope neoclip<CR>", { desc = "Telescope Neoclip"})

View File

@ -1,25 +0,0 @@
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- optionally enable 24-bit colour
vim.opt.termguicolors = true
-- empty setup using defaults
require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({
sort = {
sorter = "case_sensitive",
},
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})

View File

@ -1,78 +1,6 @@
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = "Find Files" }) vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', "<cmd>lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>", { desc = "Live Grep" }) vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('n', '<leader>fc', '<cmd>lua require("telescope.builtin").live_grep({ glob_pattern = "!{spec,test}"})<CR>', { desc = "Live Grep Code" }) vim.keymap.set('n', '<leader>ps', function()
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = "Find Buffers" }) builtin.grep_string({ search = vim.fn.input("Grep > ") })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "Find Help Tags" }) end)
vim.keymap.set('n', '<leader>fs', builtin.lsp_document_symbols, { desc = "Find Symbols" })
vim.keymap.set('n', '<leader>fi', '<cmd>AdvancedGitSearch<CR>', { desc = "AdvancedGitSearch" })
vim.keymap.set('n', '<leader>fo', builtin.oldfiles, { desc = "Find Old Files" })
vim.keymap.set('n', '<leader>fw', builtin.grep_string, { desc = "Find Word under Cursor" })
local telescope = require("telescope")
local telescopeConfig = require("telescope.config")
-- Clone the default Telescope configuration
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
-- I want to search in hidden/dot files.
table.insert(vimgrep_arguments, "--hidden")
-- I don't want to search in the `.git` directory.
table.insert(vimgrep_arguments, "--glob")
table.insert(vimgrep_arguments, "!**/.git/*")
local actions = require "telescope.actions"
telescope.setup({
defaults = {
-- `hidden = true` is not supported in text grep commands.
vimgrep_arguments = vimgrep_arguments,
path_display = { "truncate" },
mappings = {
n = {
["<C-w>"] = actions.send_selected_to_qflist + actions.open_qflist,
},
i = {
["<C-j>"] = actions.cycle_history_next,
["<C-k>"] = actions.cycle_history_prev,
["<C-w>"] = actions.send_selected_to_qflist + actions.open_qflist,
}
},
},
pickers = {
find_files = {
-- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d.
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
},
},
extensions = {
undo = {
use_delta = true,
use_custom_command = nil, -- setting this implies `use_delta = false`. Accepted format is: { "bash", "-c", "echo '$DIFF' | delta" }
side_by_side = false,
diff_context_lines = vim.o.scrolloff,
entry_format = "state #$ID, $STAT, $TIME",
mappings = {
i = {
["<C-cr>"] = require("telescope-undo.actions").yank_additions,
["<S-cr>"] = require("telescope-undo.actions").yank_deletions,
["<cr>"] = require("telescope-undo.actions").restore,
},
},
},
}
})
require("telescope").load_extension "neoclip"
require('telescope').load_extension('fzf')
require('telescope').load_extension('ui-select')
vim.g.zoxide_use_select = true
require("telescope").load_extension("undo")
require("telescope").load_extension("advanced_git_search")
require("telescope").load_extension("live_grep_args")

View File

@ -1,8 +1,21 @@
--local builtin = require('vim-floaterm.builtin') require("toggleterm").setup{
-- size can be a number or function which is passed the current terminal
vim.keymap.set("n", "<leader>TS", size = 10,
"<cmd>:FloatermNew --height=0.3 --width=0.8 --wintype=float --name=floaterm1 --position=center --autoclose=2<CR>", { desc = "Open FloatTerm" }) open_mapping = [[<c-t>]],
vim.keymap.set("n", "<leader>TT", hide_numbers = true, -- hide the number column in toggleterm buffers
"<cmd>:FloatermToggle<CR>", { desc = "Toggle FloatTerm" }) shade_filetypes = {},
vim.keymap.set("t", "<leader>TT", autochdir = false, -- when neovim changes it current directory the terminal will change it's own when next it's opened
"<cmd>:FloatermToggle<CR>", { desc = "Toggle FloatTerm" }) shade_terminals = true, -- NOTE: this option takes priority over highlights specified so if you specify Normal highlights you should set this to false
-- shading_factor = '<number>', -- the percentage by which to lighten terminal background, default: -30 (gets multiplied by -3 if background is light)
start_in_insert = true,
insert_mappings = true, -- whether or not the open mapping applies in insert mode
terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals
persist_size = true,
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
direction = 'horizontal', -- | 'vertical' | 'tab' | 'float',
close_on_exit = true, -- close the terminal window when the process exits
-- Change the default shell. Can be a string or a function returning a string
shell = vim.o.shell,
auto_scroll = true, -- automatically scroll to the bottom on terminal output
-- This field is only relevant if direction is set to 'float'
}

View File

@ -0,0 +1,24 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "c", "julia", "latex", "lua", "python", "query", "vim", "vimdoc", "zig" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}

View File

@ -0,0 +1 @@
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)

View File

@ -1,8 +1,4 @@
require('eddie.lazy') require("eddie")
require('eddie.remaps')
require('eddie.options')
--[[
local f = io.popen("uname -s") local f = io.popen("uname -s")
if (f ~= nil) then if (f ~= nil) then
@ -10,16 +6,3 @@ if (f ~= nil) then
MY_OS = string.gsub(MY_OS, "%s+", "") MY_OS = string.gsub(MY_OS, "%s+", "")
f:close() f:close()
end end
if (MY_OS == 'Linux')
then
print('Should be here if on Linux')
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then
print('Should be here if on BSD')
else
print('Should never be here')
end
]]--

3
lua/eddie/init.lua Normal file
View File

@ -0,0 +1,3 @@
require("eddie.keymaps")
require("eddie.options")

78
lua/eddie/keymaps.lua Normal file
View File

@ -0,0 +1,78 @@
-----------------
-- Normal mode --
-----------------
-- Hint: see `:h vim.map.set()`
-- Better window navigation
vim.keymap.set("n", "<C-h>", "<C-w>h", opts)
vim.keymap.set("n", "<C-j>", "<C-w>j", opts)
vim.keymap.set("n", "<C-k>", "<C-w>k", opts)
vim.keymap.set("n", "<C-l>", "<C-w>l", opts)
-- Resize with arrows
-- delta: 2 lines
vim.keymap.set("n", "<C-Up>", ":resize -2<CR>", opts)
vim.keymap.set("n", "<C-Down>", ":resize +2<CR>", opts)
vim.keymap.set("n", "<C-Left>", ":vertical resize -2<CR>", opts)
vim.keymap.set("n", "<C-Right>", ":vertical resize +2<CR>", opts)
-- open File Explorer
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
-- Navigate buffers
vim.keymap.set("n", "<BS>", ":bnext<CR>", opts)
vim.keymap.set("n", "<S-TAB>", ":bprevious<CR>", opts)
-- Telescope
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
vim.keymap.set("n", "<leader>ps", function ()
builtin.grep_string( { search = vim.fn.input("Grep > ") } );
end)
-- Harpoon
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function () ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function () ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function () ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function () ui.nav_file(4) end)
-- Undotree
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
-- Fugitive
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
-- Put line bellow in-front of line
vim.keymap.set("n", "J", "mzJ`z")
-- Keep cursor in the middle
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv")
-- Don't loose buffer
vim.keymap.set("x", "<leader>p", "\"_dP")
-----------------
-- Visual mode --
-----------------
-- Hint: start visual mode with the same area as the previous area and the same mode
vim.keymap.set("v", "<", "<gv", opts)
vim.keymap.set("v", ">", ">gv", opts)
-- Move text on visual mode
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", opts)
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", opts)

View File

@ -1,150 +0,0 @@
local lazypath= vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
local plugins = {
{
'nvim-telescope/telescope.nvim',
tag = '0.1.5',
dependencies = { { 'nvim-lua/plenary.nvim' } }
},
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' },
{ "nvim-telescope/telescope-live-grep-args.nvim" },
{
"aaronhallaert/advanced-git-search.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"tpope/vim-fugitive",
'tpope/vim-rhubarb',
},
},
'nvim-telescope/telescope-ui-select.nvim',
'debugloop/telescope-undo.nvim',
{
"folke/tokyonight.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- load the colorscheme here
vim.cmd('colorscheme tokyonight-night')
end,
},
'ThePrimeagen/harpoon',
{
'mbbill/undotree',
config = function()
vim.keymap.set("n", "<leader>u", "<cmd>Telescope undo<CR>", { desc = "Telescope Undo" })
end
},
{
'tpope/vim-fugitive',
config = function()
vim.keymap.set("n", "<leader>gs", vim.cmd.Git, { desc = "Open Fugitive Panel" })
end
},
{ 'tpope/vim-repeat' },
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
},
{
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup()
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
},
{ 'vimwiki/vimwiki' },
{ "nvim-tree/nvim-tree.lua" },
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('lualine').setup({
options = {
theme = 'palenight'
}
})
end
},
{
'bronson/vim-trailing-whitespace'
},
{
'junegunn/fzf',
build = ":call fzf#install()"
},
{
"AckslD/nvim-neoclip.lua",
dependencies = {
{ 'nvim-telescope/telescope.nvim' },
},
},
'jinh0/eyeliner.nvim',
{
"anuvyklack/windows.nvim",
dependencies = {
"anuvyklack/middleclass",
"anuvyklack/animation.nvim"
},
config = function()
vim.o.winwidth = 10
vim.o.winminwidth = 10
vim.o.equalalways = false
require('windows').setup()
end
},
{
'voldikss/vim-floaterm',
},
{
'tummetott/unimpaired.nvim',
config = function()
require('unimpaired').setup()
end
},
'airblade/vim-gitgutter',
'mg979/vim-visual-multi',
{
'kevinhwang91/nvim-ufo',
dependencies = 'kevinhwang91/promise-async'
},
{
'folke/which-key.nvim',
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 500
end,
opts = {}
},
}
require('lazy').setup(plugins, {
change_detection = {
notify = false,
}
})

View File

@ -1,42 +1,92 @@
vim.opt.guicursor = "" -- Hint: use `:h <option>` to figure out the meaning if needed
vim.opt.clipboard = "unnamedplus" -- use system clipboard
vim.opt.completeopt = {"menu", "menuone", "noselect"}
vim.opt.mouse = "a" -- allow the mouse to be used in Nvim
vim.opt.spelllang = 'en_gb'
vim.opt.spell = true
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = true
-- Fonts -- Fonts
vim.opt.encoding="utf-8" vim.opt.encoding="utf-8"
vim.opt.guifont = "FiraCodeNerdFont-Regular:h10" vim.opt.guifont = "Meslo LG M Bold for Powerline:h10"
-- Tab
vim.opt.tabstop = 4 -- number of visual spaces per TAB
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
-- UI config
vim.opt.number = true -- show absolute number
vim.opt.relativenumber = true -- add numbers to each line on the left side
vim.opt.cursorline = false -- highlight cursor line underneath the cursor horizontally
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
vim.opt.termguicolors = true -- enable 23-bit RGB color in the TUI
vim.opt.showmode = false -- we are experienced, wo don"t need the "-- INSERT --" mode hint
-- File recovery options
vim.opt.swapfile = false vim.opt.swapfile = false
vim.opt.backup = false vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true vim.opt.undofile = true
vim.opt.hlsearch = false -- Color column
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80" vim.opt.colorcolumn = "80"
-- Searching
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
-- LSP options
vim.diagnostic.config({
virtual_text = false
})
-- Show line diagnostics automatically in hover window -- Show line diagnostics automatically in hover window
vim.o.updatetime = 250 vim.o.updatetime = 250
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
-- Leader key
vim.g.mapleader = " "
--vim.g.maplocalleader = " "
vim.g.maplocalleader = "\\"
-- Airline
vim.g.airline_powerline_fonts = 1
-- Zig
vim.g.zig_fmt_autosave = 1
-- Set completeopt to have a better completion experience
--set completeopt=menuone,noinsert,noselect
vim.opt.completeopt = "menuone,noinsert,noselect"
-- Enable completions as you type
vim.g.completion_enable_auto_popup = 1
-- Python
vim.g.loaded_python_provider = 0
vim.g.python3_host_prog = "/usr/local/bin/python"
-- Vimtex options:
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_general_viewer = "zathura"
vim.g.vimtex_quickfix_mode = 0
-- Ignore mappings
vim.g.vimtex_mappings_enabled = 1
---- Auto Indent
--vim.g["vimtex_indent_enabled"] = 1
---- Syntax highlighting
vim.g.vimtex_syntax_enabled = 0
-- Error suppression:
vim.g.vimtex_log_ignore = ({
"Underfull",
"Overfull",
"specifier changed to",
"Token not allowed in a PDF string",
})

84
lua/eddie/packer.lua Normal file
View File

@ -0,0 +1,84 @@
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Fuzzy Finder
use {
'nvim-telescope/telescope.nvim', tag = '0.1.2',
-- or , branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
-- Colorscheme
--use({
-- 'rose-pine/neovim',
-- as = 'rose-pine',
-- config = function()
-- vim.cmd('colorscheme rose-pine')
-- end
--})
use { "folke/tokyonight.nvim" }
-- Color Coloring
use({ 'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' } })
use( 'nvim-treesitter/playground' )
-- Quick access to files
use( 'ThePrimeagen/harpoon' )
-- Recovery
use( 'mbbill/undotree' )
-- Git Status
use( 'tpope/vim-fugitive' )
use('airblade/vim-gitgutter')
-- Language Servers
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'}, -- Required
{ -- Optional
'williamboman/mason.nvim',
run = function()
pcall(vim.cmd, 'MasonUpdate')
end,
},
{'williamboman/mason-lspconfig.nvim'}, -- Optional
-- Autocompletion
{'hrsh7th/nvim-cmp'}, -- Required
{'hrsh7th/cmp-nvim-lsp'}, -- Required
{'L3MON4D3/LuaSnip'}, -- Required
}
}
-- Code formatting
use "lukas-reineke/lsp-format.nvim"
-- Latex on NVIM
use 'lervag/vimtex'
-- :FixWhitespace
use "bronson/vim-trailing-whitespace"
-- Terminal
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup()
end}
-- Parenthesis complete
use {
"windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup {} end
}
end)

View File

@ -1,83 +0,0 @@
-- Open Ex as buffer
-- vim.keymap.set("n", "<leader>pv", vim.cmd.Ex, { desc = "Open Ex" })
vim.keymap.set("n", "<leader>pv", ":NvimTreeToggle<CR>", { desc = "Open Ex" })
-- Exit insert mode without hitting Esc
vim.keymap.set("i", "jj", "<Esc>", { desc = "Esc" })
-- Make Y behave like C or D
vim.keymap.set("n", "Y", "y$")
-- Keep window centered when going up/down
vim.keymap.set("n", "J", "mzJ`z")
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv")
-- Paste without overwriting register
vim.keymap.set("v", "p", '"_dP')
-- Copy text to " register
vim.keymap.set("n", "<leader>y", "\"+y", { desc = "Yank into \" register" })
vim.keymap.set("v", "<leader>y", "\"+y", { desc = "Yank into \" register" })
vim.keymap.set("n", "<leader>Y", "\"+Y", { desc = "Yank into \" register" })
-- Delete text to " register
vim.keymap.set("n", "<leader>d", "\"_d", { desc = "Delete into \" register" })
vim.keymap.set("v", "<leader>d", "\"_d", { desc = "Delete into \" register" })
-- Get out Q
vim.keymap.set("n", "Q", "<nop>")
-- close buffer
vim.keymap.set("n", "<leader>q", "<cmd>bd<CR>", { desc = "Close Buffer" })
-- Close buffer without closing split
vim.keymap.set("n", "<leader>w", "<cmd>bp|bd #<CR>", { desc = "Close Buffer; Retain Split" })
-- Navigate between quickfix items
vim.keymap.set("n", "<leader>h", "<cmd>cnext<CR>zz", { desc = "Forward qfixlist" })
vim.keymap.set("n", "<leader>;", "<cmd>cprev<CR>zz", { desc = "Backward qfixlist" })
-- Navigate between location list items
vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz", { desc = "Forward location list" })
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz", { desc = "Backward location list" })
-- Replace word under cursor across entire buffer
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], { desc = "Replace word under cursor" })
-- Make current file executable
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Make current file executable" })
-- Jump to plugin management file
vim.keymap.set("n", "<leader>vpp", "<cmd>e ~/.config/nvim/lua/exosyphon/lazy.lua<CR>", { desc = "Jump to lazy.lua" })
-- Git revert at current cursor location
vim.keymap.set("n", "<leader>U", "<cmd>GitGutterUndoHunk<CR>", { desc = "Revert Git Hunk" })
-- Copy file paths
vim.keymap.set("n", "<leader>cf", "<cmd>let @+ = expand(\"%\")<CR>", { desc = "Copy File Name" })
vim.keymap.set("n", "<leader>cp", "<cmd>let @+ = expand(\"%:p\")<CR>", { desc = "Copy File Path" })
vim.keymap.set("n", "<leader><leader>", function()
vim.cmd("so")
end, { desc = "Source current file" })
-- Resize with arrows
vim.keymap.set("n", "<C-S-Down>", ":resize +2<CR>", { desc = "Resize Horizontal Split Down" })
vim.keymap.set("n", "<C-S-Up>", ":resize -2<CR>", { desc = "Resize Horizontal Split Up" })
vim.keymap.set("n", "<C-Left>", ":vertical resize -2<CR>", { desc = "Resize Vertical Split Down" })
vim.keymap.set("n", "<C-Right>", ":vertical resize +2<CR>", { desc = "Resize Vertical Split Up" })
-- Visual --
-- Stay in indent mode
vim.keymap.set("v", "<", "<gv")
vim.keymap.set("v", ">", ">gv")
-- Move block
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move Block Down" })
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move Block Up" })
-- Search for highlighted text in buffer
vim.keymap.set("v", "//", 'y/<C-R>"<CR>', { desc = "Search for highlighted text" })

View File

@ -1,20 +0,0 @@
hyperparameter
hyperparameters
NVIDIA
CIFAR
MNIST
LeNet
MUL
BCNN
Grangegorman
Cueto
Mendoza
Maynooth
Frobenius
Neuromorphic
neuromorphic
NN
pytorch
Pytorch
SOTA

Binary file not shown.