Modification to older config

This commit is contained in:
Eduardo Cueto-Mendoza 2023-08-30 12:30:31 +01:00
parent b8f48271e3
commit b0639d7041
5 changed files with 105 additions and 24 deletions

View File

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

View File

@ -31,19 +31,29 @@ lsp.setup_nvim_cmp({
lsp.on_attach(function(client, bufnr) lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false } 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", "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", "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", "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>vws", function() vim.lsp.buf.workspace_symbol() end, opts,
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.setloclist() end, opts, { desc = "LSP Show Diagnostics"}) { desc = "LSP Workspace Symbol" })
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts, { desc = "Next Diagnostic"}) 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_prev() end, opts, { desc = "Previous Diagnostic"}) vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts, { desc = "Next Diagnostic" })
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts, { desc = "LSP Code Action"}) vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts, { desc = "Previous Diagnostic" })
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts, { desc = "LSP References"}) vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts, { desc = "LSP Code Action" })
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts, { desc = "LSP Rename"}) vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts, { desc = "LSP References" })
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help"}) 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) end)
require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
--require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({})
--require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) --require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
require('lspconfig').lua_ls.setup({ require('lspconfig').lua_ls.setup({
settings = { settings = {
@ -80,6 +90,41 @@ require('lspconfig').lua_ls.setup({
}, },
}) })
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({})
lsp.setup() lsp.setup()
local cmp_action = require('lsp-zero').cmp_action() local cmp_action = require('lsp-zero').cmp_action()

View File

@ -1,13 +1,13 @@
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>ff', builtin.find_files, { desc = "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', '<leader>fg', "<cmd>lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>", { desc = "Live Grep" })
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>fc', '<cmd>lua require("telescope.builtin").live_grep({ glob_pattern = "!{spec,test}"})<CR>', { desc = "Live Grep Code" })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = "Find Buffers"}) vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = "Find Buffers" })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "Find Help Tags"}) vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "Find Help Tags" })
vim.keymap.set('n', '<leader>fs', builtin.lsp_document_symbols, { desc = "Find Symbols"}) 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>fi', '<cmd>AdvancedGitSearch<CR>', { desc = "AdvancedGitSearch" })
vim.keymap.set('n', '<leader>fo', builtin.oldfiles, { desc = "Find Old Files"}) 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"}) vim.keymap.set('n', '<leader>fw', builtin.grep_string, { desc = "Find Word under Cursor" })
local telescope = require("telescope") local telescope = require("telescope")
local telescopeConfig = require("telescope.config") local telescopeConfig = require("telescope.config")

View File

@ -211,6 +211,12 @@ local plugins = {
}) })
end end
}, },
{
'lervag/vimtex'
},
{
'bronson/vim-trailing-whitespace'
},
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features version = "*", -- Use for stability; omit to use `main` branch for the latest features
@ -251,11 +257,11 @@ local plugins = {
'voldikss/vim-floaterm', 'voldikss/vim-floaterm',
config = function() config = function()
vim.keymap.set("n", "<leader>ft", vim.keymap.set("n", "<leader>ft",
"<cmd>:FloatermNew --height=0.7 --width=0.8 --wintype=float --name=floaterm1 --position=center --autoclose=2<CR>", { desc = "Open FloatTerm"}) "<cmd>:FloatermNew --height=0.7 --width=0.8 --wintype=float --name=floaterm1 --position=center --autoclose=2<CR>", { desc = "Open FloatTerm" })
vim.keymap.set("n", "<leader>flt", vim.keymap.set("n", "<leader>flt",
"<cmd>:FloatermToggle<CR>", { desc = "Toggle FloatTerm"}) "<cmd>:FloatermToggle<CR>", { desc = "Toggle FloatTerm" })
vim.keymap.set("t", "<leader>flt", vim.keymap.set("t", "<leader>flt",
"<cmd>:FloatermToggle<CR>", { desc = "Toggle FloatTerm"}) "<cmd>:FloatermToggle<CR>", { desc = "Toggle FloatTerm" })
end end
}, },
{ {

View File

@ -13,7 +13,10 @@ vim.opt.expandtab = true
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.wrap = false vim.opt.wrap = true
-- Fonts
vim.opt.encoding = "utf-8"
vim.opt.guifont = "FiraCodeNerdFont-Regular:h10"
vim.opt.swapfile = false vim.opt.swapfile = false
vim.opt.backup = false vim.opt.backup = false
@ -41,3 +44,25 @@ vim.diagnostic.config({
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})]]
-- 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",
})