From d3cdc74f897995f36616d50dc940230a60796e69 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Wed, 28 Feb 2024 17:57:50 -0500 Subject: [PATCH] chore(nvim): remove nvim config Signed-off-by: Lucas Sta Maria --- .config/ambit/config.ambit | 17 -- .config/nvim/UltiSnips/tex.snippets | 285 ------------------------ .config/nvim/ftplugin/racket.lua | 10 - .config/nvim/ftplugin/tex.lua | 14 -- .config/nvim/init.lua | 47 ---- .config/nvim/lua/completion.lua | 0 .config/nvim/lua/git.lua | 1 - .config/nvim/lua/lsp.lua | 187 ---------------- .config/nvim/lua/mappings.lua | 73 ------ .config/nvim/lua/neovide.lua | 13 -- .config/nvim/lua/plugins.lua | 333 ---------------------------- .config/nvim/lua/treesitter.lua | 42 ---- 12 files changed, 1022 deletions(-) delete mode 100644 .config/nvim/UltiSnips/tex.snippets delete mode 100644 .config/nvim/ftplugin/racket.lua delete mode 100644 .config/nvim/ftplugin/tex.lua delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/completion.lua delete mode 100644 .config/nvim/lua/git.lua delete mode 100644 .config/nvim/lua/lsp.lua delete mode 100644 .config/nvim/lua/mappings.lua delete mode 100644 .config/nvim/lua/neovide.lua delete mode 100644 .config/nvim/lua/plugins.lua delete mode 100644 .config/nvim/lua/treesitter.lua diff --git a/.config/ambit/config.ambit b/.config/ambit/config.ambit index 280b7a7..00abed9 100644 --- a/.config/ambit/config.ambit +++ b/.config/ambit/config.ambit @@ -1,21 +1,4 @@ .config/ambit/config.ambit; -.config/nvim/[ - init.lua, - lua/[ - completion.lua, - lsp.lua, - mappings.lua, - plugins.lua, - treesitter.lua, - git.lua, - neovide.lua - ], - ftplugin/[ - tex.lua, - racket.lua - ], - UltiSnips/tex.snippets -]; .config/eww/[ eww.yuck, eww.scss, diff --git a/.config/nvim/UltiSnips/tex.snippets b/.config/nvim/UltiSnips/tex.snippets deleted file mode 100644 index 3c8d8d4..0000000 --- a/.config/nvim/UltiSnips/tex.snippets +++ /dev/null @@ -1,285 +0,0 @@ -global !p -def math(): - return vim.eval('vimtex#syntax#in_mathzone()') == '1' - -def comment(): - return vim.eval('vimtex#syntax#in_comment()') == '1' - -def env(name): - [x,y] = vim.eval("vimtex#env#is_inside('" + name + "')") - return x != '0' and y != '0' - -endglobal - -# General Formatting -snippet preamble "preamble" w -\\usepackage[a4paper, margin=0.5in]{geometry} -\\usepackage{amsmath} -\\usepackage{amsthm} -\\usepackage{amssymb} -\\usepackage{enumitem} -\\usepackage{libertine} -\\usepackage{euler} - -\\usepackage{import} -\\usepackage{pdfpages} -\\usepackage{transparent} -\\usepackage{xcolor} - -\\newcommand{\\incfig}[2][1]{% -\t\\def\\svgwidth{#1\\columnwidth} -\t\\import{./figures/}{#2.pdf_tex} -} - -\\pdfsuppresswarningpagegroup=1 - -\\theoremstyle{definition} -\\newtheorem{all}{Theorem}[section] -\\theoremstyle{definition} -\\newtheorem{corollary}[all]{Corollary} -\\theoremstyle{definition} -\\newtheorem{lemma}[all]{Lemma} -\\theoremstyle{definition} -\\newtheorem{definition}[all]{Definition} -\\theoremstyle{definition} -\\newtheorem{exercise}[all]{Exercise} -\\theoremstyle{definition} -\\newtheorem{proposition}[all]{Proposition} -\\theoremstyle{definition} -\\newtheorem{example}[all]{Example} - -\\newenvironment{lecture}[1]{ -\t\\section{\\MakeUppercase{#1}} -\t\\vspace{-0.5em} -\t\\hrule -\t\\vspace{1em} -\t\\begin{list}{}{ -\t\t\\setlength{\\leftmargin}{1.5em} -\t} -\t\\item[] -}{ -\t\\end{list} -} - -\\newcommand{\\N}{\\mathbb{N}} -\\newcommand{\\R}{\\mathbb{R}} -\\newcommand{\\I}{\\mathbb{I}} -\\newcommand{\\Z}{\\mathbb{Z}} - -endsnippet - -snippet beg "begin{} / end{}" bA -\\begin{$1} - $0 -\\end{$1} -endsnippet - -snippet tit "Italics" w -\textit{$1}$0 -endsnippet - -snippet tob "Bold" w -\textbf{$1}$0 -endsnippet - -# Text Formatting -snippet ... "ldots" A -\ldots -endsnippet - -# Math Environments -snippet im "Inline math" w -\(${1}\)`!p -if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']: - snip.rv = ' ' -else: - snip.rv = '' -`$2 -endsnippet - -snippet dm "Display math" w -\[ -${1:${VISUAL}} -\] $0 -endsnippet - -# Math Snippets -context "math()" -snippet iff "iff" iA -\iff $0 -endsnippet - -context "math()" -snippet => "implies" iA -\Rightarrow -endsnippet - -context "math()" -snippet =< "implied by" iA -\Leftarrow -endsnippet - -context "math()" -snippet -> "maps to" iA -\rightarrow -endsnippet - -context "math()" -snippet -< "maps from" iA -\leftarrow -endsnippet - -context "math()" -snippet / "Fraction" i -\\frac{$1}{$2}$0 -endsnippet - -context "math()" -snippet '([A-Za-z])(\d)' "auto subscript" wrA -`!p snip.rv = match.group(1)`_`!p snip.rv = match.group(2)` -endsnippet - -context "math()" -snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA -`!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`} -endsnippet - -snippet __ "subscript" iA -_{$1}$0 -endsnippet - -snippet ^^ "superscript" iA -^{$1}$0 -endsnippet - -context "math()" -snippet ceil "ceil" iA -\left\lceil $1 \right\rceil $0 -endsnippet - -context "math()" -snippet floor "floor" iA -\left\lfloor $1 \right\rfloor$0 -endsnippet - -context "math()" -snippet ** "cdot" iA -\cdot -endsnippet - -priority 100 -context "math()" -snippet '(? "to" iA -\to -endsnippet - -priority 200 -context "math()" -snippet <-> "leftrightarrow" iA -\leftrightarrow -endsnippet - -context "math()" -snippet !> "mapsto" iA -\mapsto -endsnippet - -context "math()" -snippet invs "inverse" iA -^{-1} -endsnippet - -context "math()" -snippet compl "complement" iA -^{c} -endsnippet - -context "math()" -snippet txt "text" iA -\\text{ $1 } $0 -endsnippet - -context "math()" -snippet set "set" wA -\\{$1\\} $0 -endsnippet - -context "math()" -snippet ccc "complement" Ai -^{c} -endsnippet - -context "math()" -snippet ooo "infinity" iA -\\infty -endsnippet - -snippet notin "not in " iA -\not\in -endsnippet - -context "math()" -snippet inn "in " iA -\in -endsnippet - -snippet NN "n" iA -\N -endsnippet - -context "math()" -snippet cap "cap" iA -\cap -endsnippet - -context "math()" -snippet cup "cup" iA -\cup -endsnippet - -context "math()" -snippet limm "limit" iA -\\lim\\limits_{$1}{$2}$0 -endsnippet - -priority 10 -context "math()" -snippet "bar" "bar" riA -\overline{$1}$0 -endsnippet - -priority 100 -context "math()" -snippet "([a-zA-Z])bar" "bar" riA -\overline{`!p snip.rv=match.group(1)`} -endsnippet - -priority 10 -context "math()" -snippet "hat" "hat" riA -\hat{$1}$0 -endsnippet - -priority 100 -context "math()" -snippet "([a-zA-Z])hat" "hat" riA -\hat{`!p snip.rv=match.group(1)`} -endsnippet diff --git a/.config/nvim/ftplugin/racket.lua b/.config/nvim/ftplugin/racket.lua deleted file mode 100644 index 2cf06fd..0000000 --- a/.config/nvim/ftplugin/racket.lua +++ /dev/null @@ -1,10 +0,0 @@ -local autopairs = require("nvim-autopairs") - -autopairs.remove_rule("'") -autopairs.remove_rule("(") -autopairs.remove_rule("[") -autopairs.remove_rule("{") -autopairs.remove_rule("<") - -vim.o["lisp"] = true -vim.o["autoindent"] = true diff --git a/.config/nvim/ftplugin/tex.lua b/.config/nvim/ftplugin/tex.lua deleted file mode 100644 index 1586492..0000000 --- a/.config/nvim/ftplugin/tex.lua +++ /dev/null @@ -1,14 +0,0 @@ --- map the key (sequence) to a command -local function map(mode, lhs, rhs, opts) - local options = { noremap = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - -map("i", "", ":w:!just") -map("n", "", ":w:!just") - -vim.cmd("inoremap : silent exec '.!inkscape-figures create \"'.getline('.').'\" \"'.b:vimtex.root.'/figures/\"':w") -vim.cmd("nnoremap : silent exec '!inkscape-figures edit \"'.b:vimtex.root.'/figures/\" > /dev/null 2>&1 &':redraw!") diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index ee321c5..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,47 +0,0 @@ --- https://github.com/priime0/dotfiles - --- given a key and value, set nvim's global settings of key to value -local function opt(key, value) - vim.o[key] = value -end - --- line numbers -opt("number", true) -opt("relativenumber", true) - --- tabs -opt("expandtab", true) -opt("tabstop", 4) -opt("shiftwidth", 4) -opt("smarttab", true) - --- indentation -opt("smartindent", true) -opt("autoindent", true) - --- misc -opt("termguicolors", true) -opt("scrolloff", 1) -opt("cursorline", true) -opt("showcmd", true) -opt("inccommand", "split") -opt("updatetime", 100) -opt("mouse", "a") -opt("mousescroll", "ver:1,hor:1") - -vim.cmd[[autocmd FocusGained * checktime]] - -vim.g.mapleader = " " -vim.g.copilot_no_tab_map = true -vim.g.maplocalleader = "," - -vim.wo.wrap = false -vim.opt.signcolumn = "yes" - -require("plugins") -require("mappings") -require("treesitter") -require("completion") -require("lsp") -require("git") -require("neovide") diff --git a/.config/nvim/lua/completion.lua b/.config/nvim/lua/completion.lua deleted file mode 100644 index e69de29..0000000 diff --git a/.config/nvim/lua/git.lua b/.config/nvim/lua/git.lua deleted file mode 100644 index 050e79c..0000000 --- a/.config/nvim/lua/git.lua +++ /dev/null @@ -1 +0,0 @@ -local neogit = require("neogit") diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua deleted file mode 100644 index 50c3e6f..0000000 --- a/.config/nvim/lua/lsp.lua +++ /dev/null @@ -1,187 +0,0 @@ -local lspconfig = require("lspconfig") -local cmp = require("cmp") -local cmp_ultisnips_mappings = require("cmp_nvim_ultisnips.mappings") - -require('lspsaga').setup {} - -cmp.setup({ - snippet = { - expand = function(args) - vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. - end, - }, - window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [""] = cmp.mapping( - function(fallback) - cmp_ultisnips_mappings.expand_or_jump_forwards(fallback) - end - ), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp', priority = 1000 }, - { name = 'ultisnips', priority = 750 }, -- For ultisnips users. - { name = 'path', priority = 500 }, - }, { - }) -}) - --- Set configuration for specific filetype. -cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. - }, { - { name = 'buffer' }, - }) -}) - --- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline('/', { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } -}) - --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) - -local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) - -local on_attach = function(client, bufnr) - local opts = { noremap = true, silent = true } - - local function key(mode, keys, cmd) - vim.api.nvim_buf_set_keymap(bufnr, mode, keys, cmd, opts) - end - - local function opt(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - -- Enable completion - opt('omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings - key('n', 'cD', 'lua vim.lsp.buf.declaration()') - key('n', 'cd', 'lua vim.lsp.buf.definition()') - key('n', 'cp', 'Lspsaga peek_definition') - key('n', 'ch', 'Lspsaga hover_doc') - key('n', 'ci', 'lua vim.lsp.buf.implementation()') - key('n', 'sh', 'Lspsaga signature_help') - key('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()') - key('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()') - key('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))') - key('n', 'D', 'lua vim.lsp.buf.type_definition()') - key('n', 'rn', 'lua vim.lsp.buf.rename()') - key('n', 'ca', 'Lspsaga code_action') - key('n', 'cr', 'lua vim.lsp.buf.references()') - -- key('n', 'f', 'lua vim.lsp.buf.format()') - key('n', 'cs', 'lua vim.diagnostic.open_float()') -end - -lspconfig.ccls.setup { - on_attach = on_attach, - capabilities = capabilities, - init_options = { - cache = { - directory = vim.fn.expand("$HOME/.cache/ccls") - } - } -} - -lspconfig.rust_analyzer.setup { - on_attach = on_attach, - capabilities = capabilities, - settings = { - ["rust-analyzer"] = { - checkOnSave = { - command = "clippy" - }, - diagnostics = { - disabled = { - "mismatched-arg-count" - } - } - } - } -} - -lspconfig.tsserver.setup { - on_attach = on_attach, - capabilities = capabilities, - filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } -} - -lspconfig.java_language_server.setup { - on_attach = on_attach, - capabilities = capabilities, - cmd = { "/usr/share/java/java-language-server/lang_server_linux.sh" }, - root_dir = lspconfig.util.root_pattern('*.iml', '.idea', 'build.xml', 'pom.xml', 'settings.gradle', - 'settings.gradle.kts') -} - ---lspconfig.jdtls.setup { --- on_attach = on_attach, --- capabilities = capabilities, --- root_dir = lspconfig.util.root_pattern( --- 'build.xml', --- 'pom.xml', --- 'settings.gradle', --- 'settings.gradle.kts', --- '*.iml', --- '.idea' --- ) ---} - -lspconfig.racket_langserver.setup { - on_attach = on_attach, - capabilities = capabilities, - root_dir = lspconfig.util.root_pattern('main.rkt') -} - -lspconfig.ocamllsp.setup { - on_attach = on_attach, - capabilities = capabilities, -} - -lspconfig.jedi_language_server.setup { - on_attach = on_attach, - capabilities = capabilities, -} - -lspconfig.lua_ls.setup { - on_attach = on_attach, - capabilities = capabilities, -} - -lspconfig.clojure_lsp.setup { - on_attach = on_attach, - capabilities = capabilities, -} - -lspconfig.texlab.setup { - on_attach=on_attach, - capabilities=capabilities -} - -lspconfig.hls.setup { - on_attach=on_attach, - capabilities=capabilities, - filetypes = { "haskell", "lhaskell", "cabal" } -} diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua deleted file mode 100644 index 44bce5e..0000000 --- a/.config/nvim/lua/mappings.lua +++ /dev/null @@ -1,73 +0,0 @@ --- map the key (sequence) to a command -local function map(mode, lhs, rhs, opts) - local options = { noremap = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - --- format -map('n', 'f', ':w:Format') - --- open terminal -map("n", "ott", ":ToggleTerm") -map("n", "otf", ":ToggleTerm direction=float") -map("n", "otv", ":ToggleTerm direction=vertical") - --- exit terminal mode -map("t", "", "") - --- open tree -map("n", "op", ":NvimTreeToggle") - --- telescope -map("n", "to", ":Telescope") -map("n", "tf", ":Telescope find_files") -map("n", "tg", ":Telescope live_grep") - --- copilot -map('i', '', 'copilot#Accept("")', {expr=true, silent=true}) - --- neogit / git related -map('n', 'gg', ':Neogit') -map('n', 'gb', ':Gitsigns blame_line') -map('n', 'gs', ':Gitsigns stage_hunk') - --- symbols outline -map("n", "os", ":SymbolsOutline") - --- leap -map("n", "", ":lua require('leap').leap {}") -map("n", "", ":lua require('leap').leap { backward = true }") - --- pollen -map("i", "", "◊") -map("i", "", "λ") - --- colorscheme toggle --- map("n", "", ":let ayucolor=\"dark\":colorscheme ayu") --- map("n", "", ":let ayucolor=\"light\":colorscheme ayu") -map("n", "", ":colorscheme catppuccin-mocha") -map("n", "", ":colorscheme catppuccin-latte") - --- horizontal scrolling -map("n", "", "zl") -map("n", "", "zh") - --- bufferline -map("n", "", ":BufferLineCycleNext") -map("n", "", ":BufferLineCyclePrev") -map("n", "", ":BufferLineMoveNext") -map("n", "", ":BufferLineMovePrev") -map("n", "bd", ":bd") - --- trouble -map("n", "od", ":TroubleToggle") - --- workspaces -map("n", "pp", ":Telescope workspaces theme=dropdown") -map("n", "pa", ":WorkspacesAdd ") - --- relative line numbers -map("n", "", ":set relativenumber!") diff --git a/.config/nvim/lua/neovide.lua b/.config/nvim/lua/neovide.lua deleted file mode 100644 index afc110f..0000000 --- a/.config/nvim/lua/neovide.lua +++ /dev/null @@ -1,13 +0,0 @@ -local fontsize = 10 - -vim.opt.guifont = { "Roboto Mono Medium", ":h" .. fontsize} - -vim.g.neovide_hide_mouse_when_typing = true - -vim.g.neovide_refresh_rate = 60 -vim.g.neovide_refresh_rate_idle = 5 - -vim.g.neovide_remember_window_size = false - -vim.g.neovide_cursor_animation_length=0.08 -vim.g.neovide_cursor_trail_size = 0.6 diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua deleted file mode 100644 index 0fa283d..0000000 --- a/.config/nvim/lua/plugins.lua +++ /dev/null @@ -1,333 +0,0 @@ -local packer = require("packer") -local use = packer.use - -packer.startup(function() - -- plugin/package manager - use("wbthomason/packer.nvim") - - -- lib - use("nvim-lua/plenary.nvim") - - -- setup - use("Olical/aniseed") - - -- language - use("nvim-treesitter/nvim-treesitter") - use("neovim/nvim-lspconfig") - use("j-hui/fidget.nvim") - use("onsails/lspkind-nvim") - use("wlangstroth/vim-racket") - use("Olical/conjure") - use("yioneko/nvim-yati") - - -- ui - use("ayu-theme/ayu-vim") - use{"catppuccin/nvim", as="catppuccin"} - use("nvim-lua/popup.nvim") - use("nvim-telescope/telescope.nvim") - use("lewis6991/gitsigns.nvim") - use("kyazdani42/nvim-web-devicons") - use("kyazdani42/nvim-tree.lua") - use("nvim-lualine/lualine.nvim") - use{"akinsho/toggleterm.nvim",branch="main"} - use("simrat39/symbols-outline.nvim") - use("lcheylus/overlength.nvim") - use("akinsho/bufferline.nvim") - use("folke/trouble.nvim") - use("m4xshen/smartcolumn.nvim") - -- use("goolord/alpha-nvim") - - -- completion - use("hrsh7th/cmp-nvim-lsp") - use("hrsh7th/cmp-buffer") - use("hrsh7th/cmp-path") - use("hrsh7th/cmp-cmdline") - use("hrsh7th/nvim-cmp") - use{"glepnir/lspsaga.nvim",branch="main"} - use("github/copilot.vim") - use("SirVer/ultisnips") - use("quangnguyen30192/cmp-nvim-ultisnips") - - -- sessions - use("rmagatti/auto-session") - use("rmagatti/session-lens") - - -- misc - use("davidgranstrom/nvim-markdown-preview") - use("folke/todo-comments.nvim") - use("lervag/vimtex") - use("TimUntersberger/neogit") - use("ggandor/leap.nvim") - use("eraserhd/parinfer-rust") - use("windwp/nvim-autopairs") - use("mhartington/formatter.nvim") - use{"kylechui/nvim-surround",branch="main"} - use("numToStr/Comment.nvim") - use("natecraddock/workspaces.nvim") - use("Twinside/vim-hoogle") - - if packer_bootstrap then - require('packer').sync() - end -end) - --- vimtex -vim.cmd("let g:vimtex_compiler_progname = 'nvr'") -require("nvim-treesitter.configs").setup { - ignore_install = { "latex" }, - highlight = { - disable = {"latex"}, - } -} - --- fidget -require("fidget").setup {} - --- ayu --- vim.cmd([[let ayucolor="light"]]) --- vim.cmd([[colorscheme ayu]]) - --- catppuccin -require("catppuccin").setup { - flavour = "latte" -} -vim.cmd([[colorscheme catppuccin]]) - --- telescope -require("telescope").setup { - defaults = { - mappings = { - i = { - [""] = require("telescope.actions").close - }, - }, - pickers = { - hidden = true, - file_ignore_patterns = { ".git/" } - } - }, - extensions = { - workspaces = { - keep_insert = false, - } - } -} -require("telescope").load_extension("workspaces") - --- git signs -require('gitsigns').setup { - signs = { - add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, - change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - delete = {hl = 'GitSignsDelete', text = '│', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - topdelete = {hl = 'GitSignsDelete', text = '│', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - changedelete = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - }, - signcolumn = true, - numhl = false, - linehl = false, - word_diff = false, - watch_gitdir = { - interval = 1500, - follow_files = true - }, -} - --- nvim-web-devicons -require('nvim-web-devicons').setup {} - --- nvim-tree -require('nvim-tree').setup { - view = { - width = 35, - signcolumn = "no", - }, - diagnostics = { - enable = true, - }, - git = { - enable = true, - ignore = true, - timeout = 1500, - }, - sync_root_with_cwd = true, -} - --- lualine -require('lualine').setup { - options = { - theme = 'ayu_dark' - }, -} - --- toggleterm -require('toggleterm').setup { - open_mapping = nil, - start_in_insert = false, -} - --- markdown preview -vim.cmd[[ - let g:mkdp_browser = 'surf' -]] - --- todo-comments -require('todo-comments').setup {} - --- copilot -vim.g.copilot_filetypes = { - ['*'] = false, - ['java'] = true, - ['ocaml'] = true, - -- ['tex'] = true, -} - --- symbols-outline -require('symbols-outline').setup {} - --- leap -require('leap').setup {} - --- overlength -require('overlength').setup {} - --- formatter -require('formatter').setup { - filetype = { - rust = { - -- Rustfmt - function() - return { - exe = "rustfmt", - args = {"--emit=stdout", "--edition=2021"}, - stdin = true - } - end - }, - c = { - require('formatter.filetypes.c').clangformat - }, - cpp = { - require('formatter.filetypes.cpp').clangformat - }, - ocaml = { - require('formatter.filetypes.ocaml').ocamlformat - }, - python = { - require('formatter.filetypes.python').black - }, - javascript = { - require('formatter.filetypes.javascript').prettier - }, - astro = { - require('formatter.filetypes.javascript').prettier - }, - tex = { - require('formatter.filetypes.latex').latexindent - }, - java = { - function () - return { - exe = "clang-format", - args = { - "--style=Google", - "--assume-filename=.java" - }, - stdin = true - } - end - }, - -- apply to all filetypes - ["*"] = { - require('formatter.filetypes.any').remove_trailing_whitespace - }, - } -} - --- bufferline -require('bufferline').setup {} - --- nvim surround -require('nvim-surround').setup {} - --- Comment -require('Comment').setup {} - --- autopairs -require("nvim-autopairs").setup { - disable_filetype = { "TelescopePrompt" } -} - --- trouble -require("trouble").setup {} -vim.diagnostic.config({ - virtual_text = false, -}) - --- workspaces -require("workspaces").setup {} - --- smartcolumn -require("smartcolumn").setup { - colorcolumn = 0, - disabled_filetypes = { "help", "Telescope", "TelescopePrompt" } -} - --- alpha --- local dashboard = require'alpha.themes.dashboard' --- dashboard.section.header.val = { --- [[ &&&&& ]], --- [[ & & &&&&& & ]], --- [[ & &&&&&/& ]], --- [[ && &&&&& ]], --- [[ & &&&& ]], --- [[ &&&&& &&&&&& ]], --- [[ & & &&/|| ]], --- [[ & & &&& &&//~ & && ]], --- [[ & &&&&\__&_/ //~~& &&&&&& & ]], --- [[ &&&&& /|\\_/&&&&& & ]], --- [[ & && &&\_\&\/& & &_&&&&&& && ]], --- [[ & &&&&&&&/&&& \&&&&&& &&& &&]], --- [[ && &/ &&&&& & & ]], --- [[ &/&& /~~ ]], --- [[ /~| ]], --- [[ \ ]], --- [[ /| ]], --- [[ /| ]], --- [[ \ ]], --- [[ / ]], --- [[ ╓───────────╭╱⎨⏆╲╮───────────╖ ]], --- [[ ║ ║ ]], --- [[ ╟────────────────────────────╢ ]], --- [[ ╟────────────────────────────╢ ]], --- [[ ╚════════════════════════════╝ ]], --- [[ ]], --- [[ [ https://priime.dev ] ]], --- } --- dashboard.section.buttons.val = { --- dashboard.button("e", " New file", ":ene startinsert "), --- dashboard.button("SPC p p", " Open projects"), --- dashboard.button("SPC t f", " Find files"), --- dashboard.button("SPC t g", " Grep text"), --- dashboard.button("q", " Quit NVIM", ":qa"), --- } --- dashboard.config.opts.noautocmd = true --- dashboard.config.opts.redraw_on_resize = false - --- require("alpha").setup(dashboard.config) - --- sessions -require("auto-session").setup { - log_level = "error", - cwd_change_handling = { - restore_upcoming_session = true, - post_cwd_changed_hook = function() - require("lualine").refresh() - vim.cmd([[filetype detect]]) - end, - }, - auto_session_suppress_dirs = { "~/", "/" } -} -vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" - -require("session-lens").setup {} diff --git a/.config/nvim/lua/treesitter.lua b/.config/nvim/lua/treesitter.lua deleted file mode 100644 index dc4e646..0000000 --- a/.config/nvim/lua/treesitter.lua +++ /dev/null @@ -1,42 +0,0 @@ -local ts_config = require("nvim-treesitter.configs") - -ts_config.setup { - ensure_installed = { - "bash", - "c", - "cpp", - "css", - "haskell", - "html", - "java", - "javascript", - "json", - "latex", - "lua", - "make", - "markdown", - "ocaml", - "python", - "regex", - "rust", - "scss", - "svelte", - "toml", - "tsx", - "typescript", - "vim", - "vue", - "yaml" - }, - highlight = { - enable = true, - use_languagetree = true - }, - indent = { - enable = false, - disable = { "python" } - }, - yati = { - enable = true, - } -}