Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
SingularisArt committed Apr 27, 2024
1 parent 1b1a42d commit ae942b0
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 128 deletions.
Binary file modified aspects/dotfiles/files/.local/share/autojump/autojump.txt
Binary file not shown.
Binary file modified aspects/dotfiles/files/.local/share/autojump/autojump.txt.bak
Binary file not shown.
8 changes: 1 addition & 7 deletions aspects/nvim/files/.config/nvim/ftplugin/tex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ if vim.g.isInkscape then
return function(_use) end
end

vim.cmd([[
setlocal fillchars=fold:\
setlocal foldlevel=0
setlocal foldmethod=expr
setlocal foldexpr=vimtex#fold#level(v:lnum)
setlocal foldtext=vimtex#fold#text()
]])
require("config.options").tex()

local which_key = require("which-key")
local options = require("config.global").which_key_vars.options
Expand Down
12 changes: 6 additions & 6 deletions aspects/nvim/files/.config/nvim/lua/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vim.api.nvim_create_autocmd("FileType", {
vim.api.nvim_create_autocmd("BufReadPost", {
group = augroup("last_loc"),
callback = function()
local mark = vim.api.nvim_buf_get_mark(0, "\"")
local mark = vim.api.nvim_buf_get_mark(0, '"')
local lcount = vim.api.nvim_buf_line_count(0)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
Expand Down Expand Up @@ -51,12 +51,12 @@ vim.api.nvim_create_autocmd("FileType", {
end,
})

-- disable folds when opening a latex file
vim.api.nvim_create_autocmd("FileType", {
group = augroup("folds"),
pattern = { "tex" },
-- Highlight when yanking (copying) text
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = augroup("highlight-yank"),
callback = function()
vim.o.foldenable = false
vim.highlight.on_yank()
end,
})

Expand Down
24 changes: 0 additions & 24 deletions aspects/nvim/files/.config/nvim/lua/config/config.lua

This file was deleted.

14 changes: 7 additions & 7 deletions aspects/nvim/files/.config/nvim/lua/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ local disable_distribution_plugins = function()
vim.g.loaded_2html_plugin = 1
vim.g.loaded_logiPat = 1
vim.g.loaded_rrhelper = 1
-- vim.g.loaded_netrw = 1
-- vim.g.loaded_netrwPlugin = 1
-- vim.g.loaded_netrwSettings = 1
-- vim.g.loaded_netrwFileHandlers = 1
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_netrwSettings = 1
vim.g.loaded_netrwFileHandlers = 1
end

local load_core = function()
-- require("config.helper").init()
require("config.helper").init()

createdir()
disable_distribution_plugins()
Expand All @@ -54,12 +54,12 @@ local load_core = function()
vim.api.nvim_set_hl(0, "SignColumn", { bg = "None" })
vim.api.nvim_set_hl(0, "FoldColumn", { bg = "None" })

require("config.options")
require("config.options").general()
require("config.autocmds")
require("config.keymaps")
require("config.lazy_nvim"):boot_strap()

vim.defer_fn(function()
-- require("config.colorscheme").load_colorscheme()
require("config.lazy")
end, 5)
end
Expand Down
132 changes: 73 additions & 59 deletions aspects/nvim/files/.config/nvim/lua/config/options.lua
Original file line number Diff line number Diff line change
@@ -1,69 +1,83 @@
-- This file is automatically loaded by plugins.config
local M = {}

local opt = vim.opt
local g = vim.g

g.mapleader = " " -- Set the leader key
g.maplocalleader = " " -- Set the local leader key
g.netrw_banner = 0 -- Remove the banner above netrw
g.markdown_recommended_style = 0 -- Fix markdown indentation settings
M.general = function()
g.mapleader = " " -- Set the leader key
g.maplocalleader = " " -- Set the local leader key
g.netrw_banner = 0 -- Remove the banner above netrw
g.markdown_recommended_style = 0 -- Fix markdown indentation settings

opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 2 -- Hide * markup for bold and italic
opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.cursorline = true -- Enable highlighting of the current line
opt.expandtab = true -- Use spaces instead of tabs
opt.formatoptions = "jcroqlnt" -- Tcqj
opt.grepformat = "%f:%l:%c:%m" -- Format
opt.grepprg = "rg --vimgrep" -- For searching
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- Preview incremental substitute
opt.laststatus = 3 -- Make statusbar cover entire area
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append { W = true, I = true, c = true }
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" } -- Languages used for spell check
opt.splitbelow = true -- Put new windows below current
opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
opt.timeoutlen = 300 -- Timeout in milliseconds before which key pops up
opt.undofile = true -- Keep undo files
opt.undolevels = 10000 -- Level of undo times
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
opt.foldenable = false -- Disable Folds
opt.foldmethod = "manual" -- "manual" for manual folds; "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter to generate folds
opt.foldcolumn = "1"
opt.foldlevel = 2 -- Fold levels opened at file opens
opt.foldlevelstart = 99
opt.foldnestmax = 3 -- Max level of fold
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 2 -- Hide * markup for bold and italic
opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.cursorline = true -- Enable highlighting of the current line
opt.expandtab = true -- Use spaces instead of tabs
opt.formatoptions = "jcroqlnt" -- Tcqj
opt.grepformat = "%f:%l:%c:%m" -- Format
opt.grepprg = "rg --vimgrep" -- For searching
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- Preview incremental substitute
opt.laststatus = 3 -- Make statusbar cover entire area
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" } -- Languages used for spell check
opt.splitbelow = true -- Put new windows below current
opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
opt.timeoutlen = 300 -- Timeout in milliseconds before which key pops up
opt.undofile = true -- Keep undo files
opt.undolevels = 10000 -- Level of undo times
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
opt.foldenable = false -- Disable Folds
opt.foldmethod = "manual" -- "manual" for manual folds; "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter to generate folds
opt.foldcolumn = "1"
opt.foldlevel = 2 -- Fold levels opened at file opens
opt.foldlevelstart = 99
opt.foldnestmax = 3 -- Max level of fold
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time

local fcs = vim.opt.fillchars:get()
if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append({ C = true })
end

if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append { C = true }
-- DO NOT INCLUDE THIS
vim.cmd("set rtp+=~/Documents/school-notes/current-course")
-- DO NOT INCLUDE THIS
end

-- DO NOT INCLUDE THIS
vim.cmd("set rtp+=~/Documents/school-notes/current-course")
-- DO NOT INCLUDE THIS
-- Function for setting tex options
M.tex = function()
opt.spell = true
opt.tw = 80
opt.fillchars = { fold = " ", vert = "" }
opt.foldlevel = 0
opt.foldmethod = "expr"
opt.foldexpr = "vimtex#fold#level(v:lnum)"
opt.foldtext = "vimtex#fold#text()"
end

return M
35 changes: 28 additions & 7 deletions aspects/nvim/files/.config/nvim/lua/modules/editor/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,29 @@ function config.telescope()
local telescope = require("telescope")

local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local icons = require("config.global").icons

-- Insert filename into the current buffer and keeping the insert mode.
actions.insert_name_i = function(prompt_bufnr)
local symbol = action_state.get_selected_entry().ordinal
actions.close(prompt_bufnr)
vim.schedule(function()
vim.cmd([[startinsert]])
vim.api.nvim_put({ symbol }, "", true, true)
end)
end

-- Insert file path and name into the current buffer and keeping the insert mode.
actions.insert_name_and_path_i = function(prompt_bufnr)
local symbol = action_state.get_selected_entry().value
actions.close(prompt_bufnr)
vim.schedule(function()
vim.cmd([[startinsert]])
vim.api.nvim_put({ symbol }, "", true, true)
end)
end

telescope.setup({
defaults = {
prompt_prefix = icons.ui.Telescope .. " ",
Expand Down Expand Up @@ -142,7 +163,7 @@ function config.telescope()
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<C-l>"] = actions.complete_tag,
["<C-h>"] = actions.which_key,
["<esc>"] = actions.close,
-- ["<esc>"] = actions.close,
},

n = {
Expand Down Expand Up @@ -452,7 +473,7 @@ function config.neo_tree()
{
"container",
content = {
{ "name", zindex = 10 },
{ "name", zindex = 10 },
{
"symlink_target",
zindex = 10,
Expand Down Expand Up @@ -482,17 +503,17 @@ function config.neo_tree()
"container",
content = {
{ "name", zindex = 10 },
{ "clipboard", zindex = 10 },
{ "bufnr", zindex = 10 },
{ "modified", zindex = 20, align = "right" },
{ "clipboard", zindex = 10 },
{ "bufnr", zindex = 10 },
{ "modified", zindex = 20, align = "right" },
{ "diagnostics", zindex = 20, align = "right" },
{ "git_status", zindex = 15, align = "right" },
{ "git_status", zindex = 15, align = "right" },
},
},
},
message = {
{ "indent", with_markers = false },
{ "name", highlight = "NeoTreeMessage" },
{ "name", highlight = "NeoTreeMessage" },
},
terminal = {
{ "indent" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ local treesitter_obj = function()
swap_next = { ["[n"] = "@parameter.inner" },
swap_previous = { ["]p"] = "@parameter.inner" },
},
lsp_interop = {
enable = true,
border = "rounded",
peek_definition_code = {
["J"] = "@class.outer",
},
},
},
})
end
Expand Down Expand Up @@ -205,6 +198,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
end
end,
})

return {
treesitter = treesitter,
treesitter_obj = treesitter_obj,
Expand Down
6 changes: 6 additions & 0 deletions aspects/nvim/files/.config/nvim/lua/modules/lsp/handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ lsp.attach_mappings = function(_, bufnr)
d = {
name = "Definition",
d = { "<CMD>Glance definitions<CR>", "Definition" },
p = {
function()
require("nvim-treesitter.textobjects.lsp_interop").peek_definition_code("@function.outer", nil, "textDocument/typeDefinition")
end,
"Preview Definition"
},
r = { "<CMD>Glance references<CR>", "References" },
t = { "<CMD>Glance type_definitions<CR>", "Type Definition" },
i = { "<CMD>Glance implementations<CR>", "Implementation" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ return {
},
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.stdpath("config") .. "/lua"] = true,
"${3rd}/luv/library",
unpack(vim.api.nvim_get_runtime_file('', true)),
vim.fn.expand("$VIMRUNTIME/lua"),
vim.fn.stdpath("config") .. "/lua",
},
},
telemetry = {
Expand Down
Loading

0 comments on commit ae942b0

Please sign in to comment.