more stuff

This commit is contained in:
2023-03-20 16:27:43 -07:00
parent 28ab0d57b7
commit b626201d51
8 changed files with 412 additions and 67 deletions

View File

@@ -1,74 +1,106 @@
-- aliases
local o = vim.o
local c = vim.cmd
local map = vim.api.nvim_set_keymap
-- check for vscode nvim plugin
-- (https://github.com/vscode-neovim/vscode-neovim)
if not vim.g.vscode then
-- options
o.termguicolors = true
o.mouse = 'a'
o.autoindent = true
o.wrap = true
o.nobinary = true
o.relativenumber = true
o.tabstop = 4
o.shiftwidth = 4
c.colorscheme 'catppuccin'
-- keybinds
-- file management
map('n', '<c-t>', ':CHADopen<cr>', {silent = true})
map('n', '<c-`>', ':ToggleTerm<cr>', {silent = true})
-- exit terminal requires <Cmd> prefix
map('t', '<c-`>', '<Cmd>:ToggleTerm<cr>', {silent = true})
map('n', '<Space>gs', ':Telescope git_status<cr>', {silent = true})
map('n', '<Space>gc', ':Telescope git_commits<cr>', {silent = true})
map('n', '<Space><Space>', ':Telescope find_files<cr>', {silent = true})
-- buffer management
map('n', '<c-h>', ':bp<cr>', {silent = true})
map('n', '<c-l>', ':bn<cr>', {silent = true})
-- plugin configs
vim.g['airline_powerline_fonts'] = 1
vim.g['airline_theme'] = 'powerlineish'
vim.g['airline#extensions#tabline#enabled'] = 1
vim.g['airline#extensions#tabline#fnamemod'] = ':t'
-- plugin imports
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- aliases
-- Visual
use 'vim-airline/vim-airline'
use 'vim-airline/vim-airline-themes'
use { "catppuccin/nvim", as = "catppuccin" }
local o = vim.o
local c = vim.cmd
local map = vim.api.nvim_set_keymap
-- Editor
use {'neovim/nvim-lspconfig', config = function()
local lspc = require('lspconfig')
lspc['pyright'].setup{}
lspc['tsserver'].setup{}
lspc['rust-analyzer'].setup{}
end}
use {'ms-jpq/chadtree', branch = 'chad'}
use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup()
end}
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function()
vim.cmd[[TSEnable highlight]]
end}
-- options
end)
o.termguicolors = true
o.mouse = 'a'
-- o.autoindent = true
o.smartindent = true -- replacing autoindent with this
o.wrap = true
o.nobinary = true
o.relativenumber = true
o.tabstop = 4
o.shiftwidth = 4
o.expandtab = true
-- NOTE: pcall prevents plugin system from shitting itself on first load
if not pcall(function()
c.colorscheme 'catppuccin'
end) then
print("Failed to load colorscheme - probably has not been installed")
end
-- keybinds
-- file management
map('n', '<c-t>', ':CHADopen<cr>', {silent = true})
map('n', '<c-`>', ':ToggleTerm direction="float"<cr>', {silent = true})
-- exit terminal requires <Cmd> prefix
map('t', '<c-`>', '<Cmd>:ToggleTerm<cr>', {silent = true})
map('n', '<Space>gs', ':Telescope git_status<cr>', {silent = true})
map('n', '<Space>gc', ':Telescope git_commits<cr>', {silent = true})
map('n', '<Space>:', ':Telescope commands<cr>', {silent = true})
map('n', '<Space><Space>', ':Telescope find_files<cr>', {silent = true})
map('n', '<Space>f', ':Telescope grep_string<cr>', {silent = true})
-- buffer management
map('n', '<c-h>', ':bp<cr>', {silent = true})
map('n', '<c-l>', ':bn<cr>', {silent = true})
-- plugin configs
vim.g['airline_powerline_fonts'] = 1
vim.g['airline_theme'] = 'powerlineish'
vim.g['airline#extensions#tabline#enabled'] = 1
vim.g['airline#extensions#tabline#fnamemod'] = ':t'
-- plugin imports
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Visual
use 'vim-airline/vim-airline'
use 'vim-airline/vim-airline-themes'
use { "catppuccin/nvim", as = "catppuccin" }
use 'airblade/vim-gitgutter'
-- Editor
use {'neovim/nvim-lspconfig', config = function()
local lspc = require('lspconfig')
lspc['pyright'].setup{}
lspc['tsserver'].setup{}
lspc['clojure_lsp'].setup{}
lspc['racket_langserver'].setup{}
lspc['rust_analyzer'].setup{}
lspc['gopls'].setup{}
end}
use 'hrsh7th/cmp-nvim-lsp'
use {'hrsh7th/nvim-cmp', config = function()
local cmp = require 'cmp'
cmp.setup {
sources = {
{ name = 'nvim_lsp' },
}
}
end}
use {'ms-jpq/chadtree', branch = 'chad'}
use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup()
end}
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function()
require'nvim-treesitter.configs'.setup{
highlight = {enable = true}
}
end}
end)
end

View File

@@ -0,0 +1,139 @@
{
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "'CaskaydiaCove Nerd Font', Menlo, Monaco, 'Courier New', monospace",
"editor.inlineSuggest.enabled": true,
"latex-workshop.view.pdf.viewer": "tab",
"github.copilot.enable": {
"*": false,
"yaml": false,
"plaintext": false,
"markdown": false,
"go": false,
"python": false,
"html": true,
"rust": false,
"javascript": true,
"lua": true,
"typescript": false
},
"svelte.enable-ts-plugin": true,
"git.enableSmartCommit": true,
"git.confirmSync": false,
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt"
],
"editor.guides.bracketPairs": true,
"editor.bracketPairColorization.enabled": true,
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.tabSize": 2
},
"workbench.editor.untitled.hint": "hidden",
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"workbench.settings.openDefaultKeybindings": true,
"[yaml]": {
"editor.defaultFormatter": "SimonSiefke.prettier-vscode"
},
"editor.fontLigatures": true,
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"julia.enableTelemetry": true,
"vscode-neovim.neovimExecutablePaths.darwin": "/opt/homebrew/bin/nvim --noplugin",
"workbench.editorAssociations": {
"*.wasm": "default",
"*.stl": "default"
},
"workbench.productIconTheme": "material-product-icons",
"rust-analyzer.inlayHints.typeHints.enable": false,
"rust-analyzer.inlayHints.renderColons": false,
"rust-analyzer.inlayHints.chainingHints.enable": false,
"rust-analyzer.inlayHints.closingBraceHints.enable": false,
"rust-analyzer.inlayHints.parameterHints.enable": false,
"update.mode": "manual",
"calva.keybindingsEnabled": false,
//Add following lines of code to exclude the files & folders which aren't important for watchers to look for changes...
//exludes files & folders in search indexing
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/env": true,
"**/venv": true
},
//exludes files & folders for watcher service
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/env/**": true,
"**/venv/**": true,
"env-*": true
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"arduino.useArduinoCli": true,
"arduino.path": "/opt/homebrew/bin/",
"arduino.commandPath": "arduino-cli",
"workbench.colorCustomizations": {
"[Default Dark+]": {
// "titleBar.activeBackground": "#883333",
// "titleBar.inactiveBackground": "#aa5555"
// "titleBar.activeBackground": "#3a6acc",
// "titleBar.inactiveBackground": "#4a7add",
"titleBar.activeBackground": "#202020",
"titleBar.border": "#242424",
"editor.background": "#141414",
"sideBar.background": "#191919",
"activityBar.background": "#242424",
"tab.inactiveBackground": "#202020",
"tab.hoverBackground": "#323232",
"statusBar.background": "#191919",
"statusBar.noFolderBackground": "#622"
}
},
"go.toolsManagement.autoUpdate": true,
"extensions.ignoreRecommendations": true,
"svelte.plugin.svelte.note-new-transformation": false,
"diffEditor.ignoreTrimWhitespace": false,
"window.confirmBeforeClose": "keyboardOnly",
"cmake.configureOnOpen": true,
"files.associations": {
"*.i": "swiglang",
"*.hpp": "cpp"
},
"C_Cpp.clang_format_fallbackStyle": "LLVM",
"[c]": {
"editor.wordBasedSuggestions": false,
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true,
"editor.quickSuggestions": {
"comments": "on",
"strings": "on",
"other": "on"
}
},
"clangd.path": "/opt/homebrew/opt/llvm/bin/clangd",
"julia.symbolCacheDownload": true,
"calva.paredit.defaultKeyMap": "strict",
"jupyter.askForKernelRestart": false,
"[typescriptreact]": {
"editor.defaultFormatter": "SimonSiefke.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "SimonSiefke.prettier-vscode"
}
}