vim config changes

This commit is contained in:
Tiago Sousa 2023-10-11 18:13:14 +01:00
parent 4e77df8c01
commit 9cf19bd3a4
9 changed files with 104 additions and 95 deletions

View file

@ -16,6 +16,6 @@ require('nvim-treesitter.configs').setup {
}
require('orgmode').setup({
org_agenda_files = { '~/Nextcloud/Documents/uni/**/*'},
org_default_notes_file = '~/Nextcloud/Documents/uni/refile.org',
org_agenda_files = { '~/Nextcloud/org/**/*'},
org_default_notes_file = '~/Nextcloud/org/refile.org',
})

View file

@ -39,7 +39,6 @@ return require('packer').startup(function(use)
use("williamboman/mason-lspconfig.nvim")
use("hrsh7th/cmp-nvim-lsp")
use("neovim/nvim-lspconfig")
use("mfussenegger/nvim-jdtls")
use("jose-elias-alvarez/null-ls.nvim")
use({
"L3MON4D3/LuaSnip",

View file

@ -1,13 +1,9 @@
return require('packer').startup(function(use)
-- Packer can manage itself
use("wbthomason/packer.nvim")
use("nvim-lua/plenary.nvim")
use("nvim-lua/popup.nvim")
use("nvim-telescope/telescope.nvim")
use("tpope/vim-surround")
use("tpope/vim-fugitive")
use("theprimeagen/harpoon")
use("mbbill/undotree")
-- fidget change when rewrite version comes out
@ -25,15 +21,6 @@ return require('packer').startup(function(use)
use("lervag/vimtex")
use({
"hrsh7th/nvim-cmp",
requires = {
"hrsh7th/cmp-nvim-lsp", -- lsp
"hrsh7th/cmp-buffer", --buffer completions
"hrsh7th/cmp-path", --path completions
"hrsh7th/cmp-cmdline" --cmdline completions
},
})
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
@ -52,10 +39,6 @@ return require('packer').startup(function(use)
run = ":TSUpdate"
})
use("nvim-orgmode/orgmode")
use('nvim-lualine/lualine.nvim')
use("nvim-treesitter/playground")
use("romgrk/nvim-treesitter-context")

View file

@ -1,6 +1,7 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
event = "InsertEnter",
dependencies = {
'hrsh7th/cmp-nvim-lsp', -- lsp
'hrsh7th/cmp-nvim-lua', -- Nvim API completions
'hrsh7th/cmp-nvim-lsp-signature-help', -- Show function signatures
@ -11,7 +12,7 @@ return {
'rafamadriz/friendly-snippets',
'saadparwaiz1/cmp_luasnip',
},
opts = function(_, opts)
config = function()
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return

View file

@ -1 +1,6 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
return {
"tpope/vim-fugitive",
config = function()
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
end
}

View file

@ -1,10 +1,15 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
return {
"theprimeagen/harpoon",
config = function()
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", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-j>", function () ui.nav_file(1) end)
vim.keymap.set("n", "<C-k>", function () ui.nav_file(2) end)
vim.keymap.set("n", "<C-l>", function () ui.nav_file(3) end)
vim.keymap.set("n", "<C-;>", function () ui.nav_file(4) end)
vim.keymap.set("n", "<C-j>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-k>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-l>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-;>", function() ui.nav_file(4) end)
end
}

View file

@ -1,21 +1,26 @@
-- -- Load custom treesitter grammar for org filetype
require('orgmode').setup_ts_grammar()
return {
"nvim-orgmode/orgmode",
config = function()
-- -- Load custom treesitter grammar for org filetype
require('orgmode').setup_ts_grammar()
-- Treesitter configuration
-- Treesitter configuration
require('nvim-treesitter.configs').setup {
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
-- highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
-- Required for spellcheck, some LaTex highlights and
-- code block highlights that do not have ts grammar
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' }, -- Or run :TSUpdate org
require('nvim-treesitter.configs').setup {
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
-- highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
-- Required for spellcheck, some LaTex highlights and
-- code block highlights that do not have ts grammar
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' }, -- Or run :TSUpdate org
}
require('orgmode').setup({
org_agenda_files = { '~/Nextcloud/Documents/uni/**/*' },
org_default_notes_file = '~/Nextcloud/Documents/uni/refile.org',
})
end
}
require('orgmode').setup({
org_agenda_files = { '~/Nextcloud/Documents/uni/**/*'},
org_default_notes_file = '~/Nextcloud/Documents/uni/refile.org',
})

View file

@ -1,40 +1,45 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
return {
"nvim-lualine/lualine.nvim",
config = function()
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = { 'filename' },
lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { 'filename' },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
end
}

View file

@ -1,9 +1,15 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = {"lua","vim","python","rust","haskell","c","java", "bash","go"},
sync_install = false,
return {
"nvim-treesitter/nvim-treesitter",
run = "TSUpdate",
config = function()
endrequire 'nvim-treesitter.configs'.setup {
ensure_installed = { "lua", "vim", "python", "rust", "haskell", "c", "java", "bash", "go" },
sync_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
end
}