chore(nvim): cleaned config a bit

This commit is contained in:
Afonso Franco 2024-03-03 16:58:37 +00:00
parent 0dc317e3b7
commit 7117f8beb0
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
8 changed files with 83 additions and 197 deletions

View file

@ -3,7 +3,7 @@ local npairs = require('nvim-autopairs')
npairs.setup({
map_cr = true,
map_bs = true,
map_bs = false,
check_ts = true,
enable_check_bracket_line = true,
ignored_next_char = "[%w]"

View file

@ -14,7 +14,7 @@ require('copilot').setup({
},
filetypes = {
yaml = false,
markdown = false,
markdown = true,
help = false,
gitcommit = false,
gitrebase = false,

View file

@ -0,0 +1,29 @@
local dap = require("dap")
dap.adapters.lldb = {
type = 'server',
port = "${port}",
executable = {
command = '/Users/afonso/.local/share/nvim/mason/bin/codelldb',
args = {"--port", "${port}"},
}
}
dap.configurations.c = {
{
name = "codelldb: With args",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
args = function()
local args = vim.fn.input('Arguments: ')
return args ~= '' and { args } or nil
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
},
}

View file

@ -1,4 +1,6 @@
local opts = { noremap = true, silent = true, buffer = true }
--Convert between py and ipynb
vim.keymap.set('n', '<leader>jnp', '<cmd>call jukit#convert#notebook_convert()<CR>', opts)
-- Create new code cell below. Argument: Whether to create code cell (0) or markdown cell (1)
vim.keymap.set('n', '<leader>jco', '<cmd>call jukit#cells#create_below(0)<CR>', opts)
-- Create new code cell above. Argument: Whether to create code cell (0) or markdown cell (1)

View file

@ -10,19 +10,7 @@ lazy.setup({
name = "catppuccin",
lazy = false,
priority = 1000,
config = function()
require("catppuccin").setup({
integrations = {
cmp = true,
treesitter = true,
treesitter_context = true,
fidget = true,
telescope = true,
leap = true,
mason = true,
},
})
end
opts = {}
},
'sainnhe/gruvbox-material',
@ -30,33 +18,24 @@ lazy.setup({
-------------------------------------------------------MFP---------------------------------
{
'susliko/tla.nvim',
config = function()
require("tla").setup()
end
opts = {}
},
-------------------------------------------------------QOL---------------------------------
{
'chipsenkbeil/distant.nvim',
branch = 'v0.3',
'jbyuki/instant.nvim',
config = function()
require('distant'):setup({
servers = {
['10.8.0.9'] = {
launch = {
default = {
username = 'afonso',
args = '--port 8080 --shutdown lonely=1'
}
}
},
}
})
vim.g.instant_username = 'afonso'
end
},
'vimpostor/vim-tpipeline',
{
'TobinPalmer/pastify.nvim',
cmd = { 'Pastify' },
opts = {}
},
--Python notebooks
{
@ -66,24 +45,6 @@ lazy.setup({
end,
ft = { 'python', 'json' }
},
--org mode
{
'nvim-orgmode/orgmode',
dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
},
event = 'VeryLazy',
config = function()
-- Load treesitter grammar for org
require('orgmode').setup_ts_grammar()
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/org/**/*',
org_default_notes_file = '~/org/refile.org',
})
end,
},
{
"zbirenbaum/copilot.lua",
@ -93,55 +54,31 @@ lazy.setup({
require 'plugins.copilot'
end,
},
--better navigation with 's-letter'
{
'ggandor/leap.nvim',
event = "VeryLazy",
config = function()
require('leap').add_default_mappings()
end
},
--Nvim to browser
'subnut/nvim-ghost.nvim',
{
'2kabhishek/nerdy.nvim',
event = "VeryLazy",
dependencies = {
'stevearc/dressing.nvim',
'nvim-telescope/telescope.nvim',
},
cmd = 'Nerdy',
},
{
'declancm/cinnamon.nvim',
config = function()
require('cinnamon').setup {
scroll_limit = 10000,
always_scroll = true,
}
end
opts = {
scroll_limit = 10000,
always_scroll = true,
}
},
{
"folke/todo-comments.nvim",
event = "VeryLazy",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("todo-comments").setup {}
end
opts = {}
},
{
'folke/zen-mode.nvim',
event = "VeryLazy",
config = function()
require("zen-mode").setup {
vim.keymap.set('n', '<leader>z', '<Cmd> ZenMode <CR>', { noremap = true, silent = true })
}
end
opts = {
vim.keymap.set('n', '<leader>z', '<Cmd> ZenMode <CR>', { noremap = true, silent = true })
}
},
--Change add and remove surroundings from words
@ -149,82 +86,28 @@ lazy.setup({
{
'NvChad/nvim-colorizer.lua',
config = function()
require 'colorizer'.setup()
end
opts = {}
},
-- {
-- "roobert/tailwindcss-colorizer-cmp.nvim",
-- event = "VeryLazy",
-- config = function()
-- require("tailwindcss-colorizer-cmp").setup({
-- color_square_width = 2,
-- })
-- end
-- },
-- {
-- 'laytan/tailwind-sorter.nvim',
-- event = "VeryLazy",
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-lua/plenary.nvim' },
-- build = 'cd formatter && bun i && bun run build',
-- config = true,
-- },
--Database integration
-- 'tpope/vim-dadbod',
-- {
-- 'kristijanhusak/vim-dadbod-ui',
-- config = function()
-- vim.g.db_ui_auto_execute_table_helpers = 1
-- end
-- },
-- 'kristijanhusak/vim-dadbod-completion',
'mbbill/undotree',
--Tmux navigation
{
'alexghergh/nvim-tmux-navigation',
config = function()
require 'nvim-tmux-navigation'.setup {
disable_when_zoomed = true, -- defaults to false
keybindings = {
left = "<F5>",
down = "<F6>",
up = "<F7>",
right = "<F8>",
}
opts = {
disable_when_zoomed = true, -- defaults to false
keybindings = {
left = "<F5>",
down = "<F6>",
up = "<F7>",
right = "<F8>",
}
end
}
},
-- Rename variable pop up
'stevearc/dressing.nvim',
-- {
-- 'krady21/compiler-explorer.nvim',
-- event = "VeryLazy",
-- config = function()
-- require("compiler-explorer").setup({
-- url = "https://godbolt.org",
-- infer_lang = true, -- Try to infer possible language based on file extension.
-- line_match = {
-- highlight = true, -- highlight the matching line(s) in the other buffer.
-- jump = true, -- move the cursor in the other buffer to the first matching line.
-- },
-- open_qflist = true, -- Open qflist after compilation if there are diagnostics.
-- split = "split", -- How to split the window after the second compile (split/vsplit).
-- compiler_flags = "", -- Default flags passed to the compiler.
-- job_timeout_ms = 25000, -- Timeout for libuv job in milliseconds.
-- languages = { -- Language specific default compiler/flags
-- c = {
-- compiler = "cg132"
-- }
-- },
-- })
-- end
-- },
{
'windwp/nvim-autopairs',
config = function()
@ -244,9 +127,7 @@ lazy.setup({
{
'stevearc/oil.nvim',
config = function()
require("oil").setup()
end
opts = {}
},
-------------------------------------------------------LSP----------------------------------------------
@ -303,6 +184,9 @@ lazy.setup({
},
{
"mfussenegger/nvim-dap",
config = function()
require 'plugins.dap'
end
},
{
@ -331,12 +215,17 @@ lazy.setup({
{
'lervag/vimtex',
event = "VeryLazy",
config = function()
require 'plugins.vimtex'
end
},
{
'mrcjkb/rustaceanvim',
version = '^4', -- Recommended
ft = { 'rust' },
},
-------------------------------------------------------------------------------------------
-- Syntax Highlighting
{
@ -358,16 +247,6 @@ lazy.setup({
"runoshun/vim-alloy",
--Tabs
--{
-- 'akinsho/bufferline.nvim',
-- version = 'v3.*',
-- dependencies = 'nvim-tree/nvim-web-devicons',
-- config = function()
-- require("plugins.bufferline")
-- end
--},
--does so much
{
'nvim-telescope/telescope.nvim',
@ -377,34 +256,6 @@ lazy.setup({
config = function() require('plugins.telescope') end
},
--Main menu
-- {
-- 'startup-nvim/startup.nvim',
-- dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim' },
-- config = function()
-- require('startup').setup { theme = 'dashboard' }
-- end,
-- },
-------------------------------------------OTHERS----------------------------------------------
-- {
-- "nvim-neorg/neorg",
-- build = ":Neorg sync-parsers",
-- config = function()
-- require("neorg").setup {
-- load = {
-- ["core.defaults"] = {}, -- Loads default behaviour
-- ["core.concealer"] = {} -- Adds pretty icons to your documents
-- },
-- }
-- end,
-- dependencies = { "nvim-lua/plenary.nvim" },
-- },
-- 'kmonad/kmonad-vim',
-- 'elkowar/yuck.vim',
--Discord Rich Presence
'andweeb/presence.nvim'

View file

@ -60,8 +60,16 @@ mason_lspconfig.setup_handlers {
end,
}
lspconfig["ocamllsp"].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
lspconfig["ocamllsp"].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
vim.g.rustaceanvim = {
server = {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities
},
}

View file

@ -3,12 +3,8 @@ local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.black,
null_ls.builtins.diagnostics.flake8,
null_ls.builtins.formatting.gofmt,
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.formatting.beautysh,
null_ls.builtins.formatting.prettierd.with({
filetypes = { "html", "json", "css", "js", "yaml", "markdown" },
}),

View file

@ -1,2 +1,2 @@
vim.g.vimtex_view_method = 'zathura'
vim.g.vimtex_compiler_methor = 'latexmk'
vim.g.vimtex_view_method = 'skim'
vim.g.vimtex_compiler_methor = 'pdflatex'