mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
Major Update
- Updated repo to support both mac and kde neon - bootstrap.sh updated to auto-detect OS and read from the required directory - Added VIM & NeoVIM dot files
This commit is contained in:
66
common/.config/Code/User/keybindings.json
Normal file
66
common/.config/Code/User/keybindings.json
Normal file
@@ -0,0 +1,66 @@
|
||||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
{
|
||||
"key": "ctrl+alt+b",
|
||||
"command": "bookmarks.toggle",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+t",
|
||||
"command": "workbench.action.terminal.new"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+alt+right",
|
||||
"command": "editor.emmet.action.nextEditPoint"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+alt+t",
|
||||
"command": "editor.emmet.action.matchTag"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+alt+p",
|
||||
"command": "editor.emmet.action.wrapWithAbbreviation"
|
||||
},
|
||||
{
|
||||
"key": "alt+q",
|
||||
"command": "workbench.action.terminal.focus"
|
||||
},
|
||||
{
|
||||
"key": "alt+q",
|
||||
"command": "workbench.action.focusActiveEditorGroup",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+e",
|
||||
"command": "workbench.action.focusActiveEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+e",
|
||||
"command": "python.execInTerminal"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+n",
|
||||
"command": "explorer.newFile"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+g",
|
||||
"command": "git.checkout"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+j",
|
||||
"command": "editor.action.joinLines"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+j",
|
||||
"command": "workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "shift+f1",
|
||||
"command": "workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminal.active"
|
||||
},
|
||||
{
|
||||
"key": "shift+escape",
|
||||
"command": "workbench.action.toggleSidebarVisibility"
|
||||
}
|
||||
]
|
||||
281
common/.config/Code/User/settings.json
Normal file
281
common/.config/Code/User/settings.json
Normal file
@@ -0,0 +1,281 @@
|
||||
{
|
||||
// Global
|
||||
"update.mode": "manual",
|
||||
"workbench.settings.editor": "json",
|
||||
//
|
||||
// Privacy
|
||||
"telemetry.telemetryLevel": "off",
|
||||
"extensions.ignoreRecommendations": true,
|
||||
//
|
||||
// Editor
|
||||
"editor.fontSize": 21, // Increase the Editor's font to offset
|
||||
"window.zoomLevel": -1, // Reduces the Activity Bar size
|
||||
"editor.cursorWidth": 4,
|
||||
"editor.minimap.enabled": false,
|
||||
"editor.wordWrap": "on",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.copyWithSyntaxHighlighting": true,
|
||||
"editor.acceptSuggestionOnEnter": "smart",
|
||||
"editor.snippetSuggestions": "top",
|
||||
"editor.guides.indentation": true,
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.multiCursorModifier": "ctrlCmd",
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.autoSave": "afterDelay",
|
||||
"files.autoSaveDelay": 1000,
|
||||
"diffEditor.renderSideBySide": true,
|
||||
"diffEditor.ignoreTrimWhitespace": false,
|
||||
//
|
||||
// Editor Font
|
||||
"editor.fontFamily": "FuraCode Nerd Font",
|
||||
"editor.fontLigatures": true,
|
||||
"terminal.integrated.fontFamily": "FuraCode Nerd Font",
|
||||
"terminal.integrated.fontSize": 20,
|
||||
//
|
||||
// Workbench - Everything that surrounds the editor
|
||||
"workbench.startupEditor": "newUntitledFile",
|
||||
"workbench.sideBar.location": "left",
|
||||
"workbench.colorCustomizations": {
|
||||
"tab.activeBackground": "#07f7af3f",
|
||||
"tab.activeBorder": "#ffffff"
|
||||
},
|
||||
"bookmarks.navigateThroughAllFiles": true,
|
||||
"window.menuBarVisibility": "compact",
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
//
|
||||
// Screencast Options
|
||||
"screencastMode.verticalOffset": 5,
|
||||
"screencastMode.fontSize": 45,
|
||||
//
|
||||
// Debugging
|
||||
"debug.toolBarLocation": "docked",
|
||||
//
|
||||
// Prettier Plugin
|
||||
"prettier.tabWidth": 4,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"prettier.useTabs": false,
|
||||
"prettier.printWidth": 85,
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
//
|
||||
// Code Spell Checker Plugin
|
||||
"cSpell.diagnosticLevel": "Hint",
|
||||
"cSpell.allowCompoundWords": true,
|
||||
"cSpell.fixSpellingWithRenameProvider": true,
|
||||
"cSpell.enableFiletypes": ["shellscript"],
|
||||
"cSpell.minWordLength": 3,
|
||||
"cSpell.numSuggestions": 10,
|
||||
"cSpell.userWords": [
|
||||
"Aadhaar",
|
||||
"Aiginia",
|
||||
"BBSR",
|
||||
"Bhubaneswar",
|
||||
"CLR",
|
||||
"Destructured",
|
||||
"GOPATH",
|
||||
"IIS",
|
||||
"JIT",
|
||||
"Jython",
|
||||
"Kumar",
|
||||
"LINQ",
|
||||
"MVC",
|
||||
"Monomorphization",
|
||||
"OOP",
|
||||
"Odisha",
|
||||
"Postgres",
|
||||
"Pratik",
|
||||
"Printf",
|
||||
"Println",
|
||||
"Sprintf",
|
||||
"Struct",
|
||||
"Structs",
|
||||
"Tripathy",
|
||||
"VIMP",
|
||||
"VVIMP",
|
||||
"VVVIMP",
|
||||
"Vec",
|
||||
"arity",
|
||||
"atleast",
|
||||
"destructure",
|
||||
"elif",
|
||||
"mkdir",
|
||||
"monomorphized",
|
||||
"pratiktri",
|
||||
"ptr",
|
||||
"pylint",
|
||||
"subfolder",
|
||||
"ulta",
|
||||
"umount",
|
||||
"unmount"
|
||||
],
|
||||
//
|
||||
// Shell check plugin
|
||||
"shellcheck.run": "onSave",
|
||||
"shellcheck.exclude": ["2181", "2039"],
|
||||
"security.workspace.trust.untrustedFiles": "open",
|
||||
//
|
||||
// Better Comments
|
||||
"better-comments.tags": [
|
||||
{
|
||||
"tag": "!",
|
||||
"color": "#FF2D00",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "?",
|
||||
"color": "#3498DB",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "//",
|
||||
"color": "#474747",
|
||||
"strikethrough": true,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "todo",
|
||||
"color": "#FF8C00",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "*",
|
||||
"color": "#98C379",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
}
|
||||
],
|
||||
// ES Lint
|
||||
"eslint.alwaysShowStatus": true,
|
||||
"eslint.run": "onSave",
|
||||
//
|
||||
// JavaScript
|
||||
"typescript.suggest.paths": false,
|
||||
//
|
||||
// Git
|
||||
"git.enableSmartCommit": true,
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
// GetLens
|
||||
"gitlens.hovers.currentLine.over": "line",
|
||||
"gitlens.advanced.telemetry.enabled": false,
|
||||
"gitlens.statusBar.reduceFlicker": true,
|
||||
"gitlens.blame.avatars": false,
|
||||
"gitlens.currentLine.uncommittedChangesFormat": "✏️ ${ago}",
|
||||
"gitlens.codeLens.enabled": false,
|
||||
"gitlens.currentLine.enabled": false,
|
||||
"gitlens.views.branches.branches.layout": "list",
|
||||
//
|
||||
// Golang
|
||||
"go.useLanguageServer": true,
|
||||
"go.formatTool": "gofmt",
|
||||
// Markdown
|
||||
"markdownlint.run": "onType",
|
||||
"markdown.extension.print.imgToBase64": true,
|
||||
"markdown.extension.print.theme": "dark",
|
||||
"markdown.extension.toc.orderedList": true,
|
||||
"markdown.extension.tableFormatter.normalizeIndentation": true,
|
||||
"markdown.extension.list.indentationSize": "inherit",
|
||||
"markdown.extension.bold.indicator": "**",
|
||||
"markdown.extension.italic.indicator": "*",
|
||||
"markdownlint.config": {
|
||||
"default": true,
|
||||
"MD007": false,
|
||||
"MD024": false,
|
||||
"MD029": false,
|
||||
"MD030": false,
|
||||
"MD033": false,
|
||||
"MD046": false,
|
||||
"no-hard-tabs": false,
|
||||
"line-length": false
|
||||
},
|
||||
// LaTex
|
||||
// https://nevalsar.hashnode.dev/compiling-latex-with-ubuntu-and-visual-studio-code#heading-issues-with-modules-setting-additional-compiler-flags
|
||||
"latex-workshop.latex.tools": [
|
||||
{
|
||||
"name": "latexmk",
|
||||
"command": "latexmk",
|
||||
"args": [
|
||||
"--shell-escape",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-file-line-error",
|
||||
"-pdf",
|
||||
"-outdir=%OUTDIR%",
|
||||
"%DOC%"
|
||||
],
|
||||
"env": {}
|
||||
},
|
||||
{
|
||||
"name": "pdflatex",
|
||||
"command": "pdflatex",
|
||||
"args": [
|
||||
"--shell-escape",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-file-line-error",
|
||||
"%DOC%"
|
||||
],
|
||||
"env": {}
|
||||
},
|
||||
{
|
||||
"name": "bibtex",
|
||||
"command": "bibtex",
|
||||
"args": ["--shell-escape", "%DOCFILE%"],
|
||||
"env": {}
|
||||
}
|
||||
],
|
||||
|
||||
//
|
||||
// Python
|
||||
"python.jediEnabled": false,
|
||||
"python.languageServer": "Pylance",
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"workbench.colorTheme": "GitHub Dark",
|
||||
// "theme-by-language.themes": {
|
||||
// "*": "GitHub Dark",
|
||||
// "markdown": "Community Material Theme Darker High Contrast"
|
||||
// },
|
||||
|
||||
// Rust
|
||||
// "rust.build_on_save": true,
|
||||
// "rust.clippy_preference": "on",
|
||||
// "rust.full_docs": true,
|
||||
// "rust-analyzer.assist.importMergeBehavior": "last",
|
||||
// "rust-analyzer.cargo.loadOutDirsFromCheck": true,
|
||||
// "rust-analyzer.procMacro.enable": true,
|
||||
// "rust-analyzer.checkOnSave.command": "clippy",
|
||||
// "rust-analyzer.cargo.target": null,
|
||||
// "rust-analyzer.completion.postfix.enable": false,
|
||||
// "rust-analyzer.inlayHints.enable": false,
|
||||
// "rust-analyzer.inlayHints.typeHints": false,
|
||||
//
|
||||
"terminal.integrated.shell.linux": "/bin/zsh",
|
||||
"debug.javascript.autoAttachFilter": "disabled",
|
||||
"debug.onTaskErrors": "debugAnyway"
|
||||
//
|
||||
}
|
||||
15
common/.config/nvim/.neoconf.json
Normal file
15
common/.config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
common/.config/nvim/init.lua
Normal file
2
common/.config/nvim/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
53
common/.config/nvim/lazy-lock.json
Normal file
53
common/.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"LazyVim": { "branch": "main", "commit": "e996eed750aabdfaa976357450f9ccbcd333a785" },
|
||||
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
|
||||
"catppuccin": { "branch": "main", "commit": "dcef0a062de380885193fb0f919217d58b979753" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "4897996612adeb9cb39325f95c9b0481ce892edf" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "c71cab740e2add248c54c458b5ca9d6e77c30fa6" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "8a7b48f5823cc924f815129192288ec2e2b9288f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "4c75c8eeb957a99aa44ce8e526c04340ab358c5e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "09be3766669bfbabbe2863c624749d8da392c916" },
|
||||
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
|
||||
"mini.ai": { "branch": "main", "commit": "10ad2ed049fb681a829b44aeb23443c0a9c910ae" },
|
||||
"mini.bufremove": { "branch": "main", "commit": "75be0b153b0cd2499c031e57d44cde8dad4766e4" },
|
||||
"mini.comment": { "branch": "main", "commit": "a27b9115e40519ef23991af9564f43ec14a41fe2" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "cbc07203ca8faae952ca373c1f6cc5881ce97af0" },
|
||||
"mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" },
|
||||
"mini.surround": { "branch": "main", "commit": "68ce058ef9716d7d955b79363845d2dd003d6500" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "63ebe879ad4798b66d29c0b2c8d04942389d438e" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "671d8456ecbd8279de2ac4cc4f3cf967683c5770" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "b094a663ccb71733543d8254b988e6bebdbdaca4" },
|
||||
"noice.nvim": { "branch": "main", "commit": "8f1b53ab85f83e0687d0f267085ad781ec240432" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d3a3056204e1a9dbb7c7fe36c114dc43b681768c" },
|
||||
"nvim-lint": { "branch": "master", "commit": "e236bd9401709f1cfff7b9951445d965658fa3dc" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "38da5bbe1eaab2394056109e48c7e195bdb8fdfe" },
|
||||
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f636d58c8d5780e5fe79a8de5691b1712c758b05" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "8aa32aa6b84dda357849dbc0f775e69f2e04c041" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "23f3840b7520e009121b3175f528178136dd9834" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "f0267921c845c42685968401bc49aa65e18d3e09" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "74ce793a60759e3db0d265174f137fb627430355" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "531b04704fc9ff994d8b9c0720428fdc3c7d49d1" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
|
||||
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
9
common/.config/nvim/lazyvim.json
Normal file
9
common/.config/nvim/lazyvim.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extras": [
|
||||
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "2123"
|
||||
},
|
||||
"version": 2
|
||||
}
|
||||
3
common/.config/nvim/lua/config/autocmds.lua
Normal file
3
common/.config/nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
3
common/.config/nvim/lua/config/keymaps.lua
Normal file
3
common/.config/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
46
common/.config/nvim/lua/config/lazy.lua
Normal file
46
common/.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
3
common/.config/nvim/lua/config/options.lua
Normal file
3
common/.config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
265
common/.config/nvim/lua/plugins/example.lua
Normal file
265
common/.config/nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,265 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- this way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
3
common/.config/nvim/stylua.toml
Normal file
3
common/.config/nvim/stylua.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
Reference in New Issue
Block a user