Compare commits

...

26 Commits
main ... lsp

Author SHA1 Message Date
Eduardo Cueto-Mendoza 2e29638de2 Removed OCaml 2024-10-27 15:20:50 +00:00
Eduardo Cueto-Mendoza 540ebbdc05 Changed files permissions 2024-10-27 15:14:05 +00:00
Eduardo Cueto-Mendoza dc4d43a11f Changed colorscheme on Linux 2024-10-11 12:26:51 +01:00
Eduardo Cueto-Mendoza 3bb6e35f3c Changed parenthesis plugin 2024-10-04 08:16:00 +01:00
Eduardo Cueto-Mendoza c512fa1226 Added compiler and extras 2024-09-25 17:19:14 +01:00
Eduardo Cueto-Mendoza 0f68973179 Using Zathura on MacOS 2024-09-25 15:56:53 +01:00
Eduardo Cueto-Mendoza b17ba11591 Adding C/C++ debugging 2024-09-25 12:49:53 +01:00
Eduardo Cueto-Mendoza 781856e48d Modified pycodestyle to use 110 lenght 2024-09-20 11:27:11 +01:00
Eduardo Cueto-Mendoza a3c186d2ef Added OPAM configs 2024-07-30 13:03:59 +01:00
Eduardo Cueto-Mendoza 8896cb4153 Changed colorscheme 2024-07-30 11:55:47 +01:00
Eduardo Cueto-Mendoza 8152505899 Configuring nvim-tree 2024-07-26 08:11:30 +01:00
Eduardo Cueto-Mendoza 9d556e0041 modified spell dictionaries 2024-07-25 21:04:23 +01:00
Eduardo Cueto-Mendoza f2276c0771 Removed temporary dictionary for Linux 2024-07-25 20:58:35 +01:00
Eduardo Cueto-Mendoza b4c2bdba56 Solved telescope upgrade configuration 2024-07-25 20:25:30 +01:00
Eduardo Cueto-Mendoza 917393ccb1 Modified for transparent background with tokyonight theme 2024-07-24 13:22:23 +01:00
Eduardo Cueto-Mendoza 4a7f26873c Lua style 2024-05-07 12:52:05 +01:00
Eduardo Cueto-Mendoza 8fdd515d06 Can differentiate Linux by architecture 2024-05-07 12:26:56 +01:00
Eduardo Cueto-Mendoza 33e13ebba6 Set options per OS 2024-05-07 11:59:07 +01:00
Eduardo Cueto-Mendoza 5744a63865 Deleted file 2024-05-03 14:07:54 +01:00
Eduardo Cueto-Mendoza b13a79d47b Add treesitter for MacOS 2024-05-02 15:28:53 +01:00
Eduardo Cueto-Mendoza 5945db5567 Adding vimtex support 2024-05-02 09:48:40 +01:00
Eduardo Cueto-Mendoza 3ff42bdcc1 Added OCaml support 2024-04-24 16:11:53 +01:00
Eduardo Cueto-Mendoza f5d54abb9d Configured for MacOS 2024-04-24 13:09:50 +01:00
Eduardo Cueto-Mendoza 762cbfa042 Removed Magit (Already had fugitive) 2024-04-23 08:45:26 +01:00
Eduardo Cueto-Mendoza 61470bdc36 Added Magit support 2024-04-22 13:30:47 +01:00
Eduardo Cueto-Mendoza 103f2fe19e Added minimal lsp support 2024-04-18 12:10:12 +01:00
20 changed files with 918 additions and 124 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
TODO.md Normal file → Executable file
View File

12
after/plugin/color.lua Executable file
View File

@ -0,0 +1,12 @@
require("tokyonight").setup {
transparent = false,
-- styles = {
-- sidebars = "transparent",
-- floats = "transparent",
-- }
}
vim.cmd [[colorscheme tokyonight-night]]
-- vim.cmd [[colorscheme tokyonight-day]]
-- vim.cmd [[hi Normal guibg=none]]

17
after/plugin/dictionary-gb.txt Executable file
View File

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

0
after/plugin/harpoon.lua Normal file → Executable file
View File

415
after/plugin/lsp.lua Executable file
View File

@ -0,0 +1,415 @@
local lsp = require('lsp-zero')
local f = io.popen("uname -s")
if (f ~= nil) then
MY_OS = f:read("*a")
MY_OS = string.gsub(MY_OS, "%s+", "")
f:close()
end
local f = io.popen("uname -m")
if (f ~= nil) then
MY_ARCH = f:read("*a")
MY_ARCH = string.gsub(MY_ARCH, "%s+", "")
f:close()
end
lsp.preset("recommended")
if (MY_OS == 'Linux')
then
if (MY_ARCH == 'aarch64')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'julials',
'ltex',
'pylsp',
'rust_analyzer',
})
else
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'clangd',
'cmake',
'julials',
'lua_ls',
'ltex',
'pylsp',
'rust_analyzer',
})
end
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'pylsp'
})
elseif (MY_OS == 'Darwin')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'clangd',
'cmake',
'julials',
'lua_ls',
'ltex',
'pylsp',
'rust_analyzer',
})
else
print('Should never be here LSP')
end
vim.cmd([[
set rtp^=~/.opam/default/share/ocp-indent/vim
]])
local cmp = require("cmp")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<CR>"] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
})
lsp.setup_nvim_cmp({
mapping = cmp_mappings
})
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts, { desc = "LSP Goto Reference" })
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts, { desc = "LSP Goto Definition" })
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts, { desc = "LSP Hover" })
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts,
{ desc = "LSP Workspace Symbol" })
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.setloclist() end, opts, { desc = "LSP Show Diagnostics" })
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts, { desc = "Next Diagnostic" })
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts, { desc = "Previous Diagnostic" })
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts, { desc = "LSP Code Action" })
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts, { desc = "LSP References" })
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts, { desc = "LSP Rename" })
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help" })
end)
if (MY_OS == 'Linux')
then
-- Installed for Linux
require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
require('lspconfig').cmake.setup({})
--require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({})
--require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
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,
},
},
},
})
require('lspconfig').pylsp.setup {
settings = {
pylsp = {
plugins = {
-- formatter options
black = { enabled = true },
autopep8 = { enabled = false },
yapf = { enabled = false },
-- linter options
pylint = { enabled = false, executable = "pylint" },
pyflakes = { enabled = false },
pycodestyle = { enabled = true, maxLineLength = 110 },
-- type checker
pylsp_mypy = { enabled = true },
-- auto-completion options
jedi_completion = { fuzzy = true },
-- import sorting
pyls_isort = { enabled = true },
},
},
},
flags = {
debounce_text_changes = 200,
},
}
require('lspconfig').rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
diagnostics = {
enable = false;
}
}
}
})
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then
-- Installed for BSD
require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
require('lspconfig').cmake.setup({})
require('lspconfig').ltex.setup({
settings = {
ltex = {
language = "en-GB",
dictionary = {
["en-GB"] = words,
},
},
},
})
require('lspconfig').pylsp.setup {
settings = {
pylsp = {
plugins = {
-- formatter options
black = { enabled = true },
autopep8 = { enabled = false },
yapf = { enabled = false },
-- linter options
pylint = { enabled = false, executable = "pylint" },
pyflakes = { enabled = false },
pycodestyle = { enabled = true, maxLineLength = 110 },
-- type checker
pylsp_mypy = { enabled = true },
-- auto-completion options
jedi_completion = { fuzzy = true },
-- import sorting
pyls_isort = { enabled = true },
},
},
},
flags = {
debounce_text_changes = 200,
},
}
require('lspconfig').rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
diagnostics = {
enable = false;
}
}
}
})
elseif (MY_OS == 'Darwin')
then
-- Installed for Linux
require('lspconfig').clangd.setup({})
require('lspconfig').cmake.setup({})
--require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({})
--require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
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,
},
},
},
})
require('lspconfig').pylsp.setup {
settings = {
pylsp = {
plugins = {
-- formatter options
black = { enabled = true },
autopep8 = { enabled = false },
yapf = { enabled = false },
-- linter options
pylint = { enabled = false, executable = "pylint" },
pyflakes = { enabled = false },
pycodestyle = { enabled = true, maxLineLength = 110 },
-- type checker
pylsp_mypy = { enabled = true },
-- auto-completion options
jedi_completion = { fuzzy = true },
-- import sorting
pyls_isort = { enabled = true },
},
},
},
flags = {
debounce_text_changes = 200,
},
}
require('lspconfig').rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
diagnostics = {
enable = false;
}
}
}
})
else
print('Should never be here LSP config')
end
lsp.setup()
local cmp_action = require('lsp-zero').cmp_action()
require('luasnip.loaders.from_vscode').lazy_load()
-- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{
name = 'cmdline',
option = {
ignore_cmds = { 'Man', '!' }
}
}
})
})
cmp.setup({
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip', keyword_length = 2 },
{ name = 'buffer', keyword_length = 3 },
{ name = 'path' },
},
mapping = {
['<C-f>'] = cmp_action.luasnip_jump_forward(),
['<C-b>'] = cmp_action.luasnip_jump_backward(),
['<Tab>'] = cmp_action.luasnip_supertab(),
['<S-Tab>'] = cmp_action.luasnip_shift_supertab(),
},
})

84
after/plugin/neoclip.lua Normal file → Executable file
View File

@ -1,58 +1,58 @@
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 = {
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 = {
},
on_paste = {
set_reg = false,
move_to_front = false,
close_telescope = true,
},
on_replay = {
},
on_replay = {
set_reg = false,
move_to_front = false,
close_telescope = true,
},
on_custom_action = {
},
on_custom_action = {
close_telescope = true,
},
keys = {
},
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 = {},
},
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"})

9
after/plugin/nvim-tree.lua Normal file → Executable file
View File

@ -1,12 +1,5 @@
-- 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()
-- require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({

25
after/plugin/parenthesis.lua Executable file
View File

@ -0,0 +1,25 @@
require("autoclose").setup({
keys = {
["("] = { escape = false, close = true, pair = "()" },
["["] = { escape = false, close = true, pair = "[]" },
["{"] = { escape = false, close = true, pair = "{}" },
[">"] = { escape = true, close = false, pair = "<>" },
[")"] = { escape = true, close = false, pair = "()" },
["]"] = { escape = true, close = false, pair = "[]" },
["}"] = { escape = true, close = false, pair = "{}" },
['"'] = { escape = true, close = true, pair = '""' },
["'"] = { escape = true, close = true, pair = "''" },
["`"] = { escape = true, close = true, pair = "``" },
["$"] = { escape = true, close = true, pair = "$$", disabled_filetypes = {} },
},
options = {
disabled_filetypes = { "text" },
disable_when_touch = false,
touch_regex = "[%w(%[{]",
pair_spaces = true,
auto_indent = true,
disable_command_mode = false,
},
})

2
after/plugin/telescope.lua Normal file → Executable file
View File

@ -51,7 +51,7 @@ telescope.setup({
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,
vim_diff_opts = { ctxlen = 0 },
entry_format = "state #$ID, $STAT, $TIME",
mappings = {
i = {

0
after/plugin/terminal.lua Normal file → Executable file
View File

64
after/plugin/treesitter.lua Executable file
View File

@ -0,0 +1,64 @@
local configs = require("nvim-treesitter.configs")
local f = io.popen("uname -s")
if (f ~= nil) then
MY_OS = f:read("*a")
MY_OS = string.gsub(MY_OS, "%s+", "")
f:close()
end
if (MY_OS == 'Linux')
then
configs.setup({
ensure_installed = {
"bash",
"c",
"json",
"julia",
"lua",
"vim",
"vimdoc",
"zig",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then
--print('Should be here if on BSD')
configs.setup({
ensure_installed = {
"bash",
"c",
"json",
"vim",
"vimdoc",
"zig",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
elseif (MY_OS == 'Darwin')
then
--print('Should be here if on MacOS')
configs.setup({
ensure_installed = {
"bash",
"c",
"julia",
"json",
"lua",
"ocaml",
"vim",
"vimdoc",
"zig",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
else
print('Should never be here')
end

22
init.lua Normal file → Executable file
View File

@ -1,25 +1,3 @@
require('eddie.lazy')
require('eddie.remaps')
require('eddie.options')
--[[
local f = io.popen("uname -s")
if (f ~= nil) then
MY_OS = f:read("*a")
MY_OS = string.gsub(MY_OS, "%s+", "")
f:close()
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
]]--

106
lua/eddie/lazy.lua Normal file → Executable file
View File

@ -1,4 +1,4 @@
local lazypath= vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
@ -15,6 +15,50 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
local plugins = {
{
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',
dependencies = {
-- LSP Support
{ 'neovim/nvim-lspconfig' }, -- Required
{ -- Optional
'williamboman/mason.nvim',
build = function()
pcall(vim.cmd, 'MasonUpdate')
end,
},
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional
-- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
{ 'L3MON4D3/LuaSnip' }, -- Required
{ "rafamadriz/friendly-snippets" },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-path' },
{ 'hrsh7th/cmp-cmdline' },
{ 'saadparwaiz1/cmp_luasnip' },
}
},
{
'nvimtools/none-ls.nvim',
config = function()
require('null-ls').setup({
})
end,
dependencies = { 'nvim-lua/plenary.nvim' },
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
},
{
"lervag/vimtex",
lazy = false, -- we don't want to lazy load VimTeX
-- tag = "v2.15", -- uncomment to pin to a specific release
},
-- Minimal
{
'nvim-telescope/telescope.nvim',
tag = '0.1.5',
@ -36,10 +80,6 @@ local plugins = {
"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',
@ -62,22 +102,22 @@ local plugins = {
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' },
{ 'm4xshen/autoclose.nvim' },
-- {
-- "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
-- },
{ "nvim-tree/nvim-tree.lua" },
{
'nvim-lualine/lualine.nvim',
@ -141,6 +181,30 @@ local plugins = {
end,
opts = {}
},
-- C/C++ debbuging
{
'sakhnik/nvim-gdb',
},
-- Compiler
{ -- This plugin
"Zeioth/compiler.nvim",
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
dependencies = { "stevearc/overseer.nvim", "nvim-telescope/telescope.nvim" },
opts = {},
},
{ -- The task runner we use
"stevearc/overseer.nvim",
commit = "6271cab7ccc4ca840faa93f54440ffae3a3918bd",
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
opts = {
task_list = {
direction = "bottom",
min_height = 25,
max_height = 25,
default_detail = 1
},
},
},
}
require('lazy').setup(plugins, {

271
lua/eddie/options.lua Normal file → Executable file
View File

@ -1,42 +1,255 @@
vim.opt.guicursor = ""
local f = io.popen("uname -s")
if (f ~= nil) then
MY_OS = f:read("*a")
MY_OS = string.gsub(MY_OS, "%s+", "")
f:close()
end
vim.opt.spelllang = 'en_gb'
vim.opt.spell = true
if (MY_OS == 'Linux')
then
-- on Linux
vim.opt.guicursor = ""
vim.opt.nu = true
vim.opt.relativenumber = true
--vim.opt.spelllang = 'en_gb'
--vim.opt.spell = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.smartindent = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.wrap = true
-- Fonts
vim.opt.encoding = "utf-8"
vim.opt.guifont = "FiraCodeNerdFont-Regular:h10"
vim.opt.smartindent = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.wrap = true
-- Fonts
vim.opt.encoding = "utf-8"
vim.opt.guifont = "FiraCodeNerdFont-Regular:h10"
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.termguicolors = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.updatetime = 50
-- optionally enable 24-bit colour
vim.opt.termguicolors = true
vim.opt.colorcolumn = "80"
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
-- Show line diagnostics automatically in hover window
vim.o.updatetime = 250
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
vim.opt.updatetime = 50
vim.opt.colorcolumn = "110"
-- LSP options
vim.diagnostic.config({
virtual_text = false
})
-- Show line diagnostics automatically in hover window
vim.o.updatetime = 250
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
-- 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",
})
-- Python provider
vim.g.python3_host_prog = "/usr/share/pyenv/shims/python"
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then
-- on BSD
vim.opt.guicursor = ""
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
vim.opt.encoding = "utf-8"
vim.opt.guifont = "FiraCodeNerdFont-Regular:h10"
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
-- 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
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "110"
-- LSP options
vim.diagnostic.config({
virtual_text = false
})
-- Show line diagnostics automatically in hover window
vim.o.updatetime = 250
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
-- Vimtex options:
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_general_viewer = "zathura"
vim.g.vimtex_quickfix_mode = 0
-- OBSD options
--vim.g.vimtex_compiler_latexmk={ 'cmd': '' }
-- 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",
})
-- Python provider
vim.g.python3_host_prog = "/usr/local/share/pyenv/shims/python"
elseif (MY_OS == 'Darwin')
then
-- on MacOS
vim.opt.guicursor = ""
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
vim.opt.encoding = "utf-8"
vim.opt.guifont = "FiraCodeNerdFont-Regular:h10"
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
-- 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
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "110"
-- LSP options
vim.diagnostic.config({
virtual_text = false
})
-- Show line diagnostics automatically in hover window
vim.o.updatetime = 250
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
-- Vimtex options:
-- vim.g.vimtex_view_method = "skim"
-- vim.g.vimtex_general_viewer = "skim"
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",
})
-- Python provider
vim.g.python3_host_prog = "/usr/local/share/pyenv/shims/python"
else
print('Should never be here LSP')
end

14
lua/eddie/remaps.lua Normal file → Executable file
View File

@ -60,7 +60,7 @@ vim.keymap.set("n", "<leader>U", "<cmd>GitGutterUndoHunk<CR>", { desc = "Revert
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.keymap.set("n", "<leader>so", function()
vim.cmd("so")
end, { desc = "Source current file" })
@ -70,6 +70,18 @@ vim.keymap.set("n", "<C-S-Up>", ":resize -2<CR>", { desc = "Resize Horizontal Sp
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" })
-- Open compiler
vim.api.nvim_set_keymap('n', '<leader><leader>', "<cmd>CompilerOpen<cr>", { noremap = true, silent = true })
-- Redo last selected option
vim.api.nvim_set_keymap('n', '<leader><leader><leader>',
"<cmd>CompilerStop<cr>" -- (Optional, to dispose all tasks before redo)
.. "<cmd>CompilerRedo<cr>",
{ noremap = true, silent = true })
-- Toggle compiler results
vim.api.nvim_set_keymap('n', '<leader><leader>t', "<cmd>CompilerToggleResults<cr>", { noremap = true, silent = true })
-- Visual --
-- Stay in indent mode
vim.keymap.set("v", "<", "<gv")

1
spell/en.utf-8.add Normal file → Executable file
View File

@ -18,3 +18,4 @@ pytorch
Pytorch
SOTA
subnetworks

BIN
spell/en.utf-8.add.spl Normal file → Executable file

Binary file not shown.