This commit is contained in:
2023-07-26 22:23:47 +01:00
parent 51f3470f98
commit 2a91b3dc68
5 changed files with 100 additions and 3 deletions

8
Scripts/SlowOpenProdApps.bash Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
sleep 2
google-chrome-stable --app="https://linear.app/johntech/team/JOH/active" --class=WebApp-Linear7107 --user-data-dir=/home/johnc/.local/share/ice/profiles/Linear7107 &
raindrop &
google-chrome-stable --app="http://calendar.cron.com" --class=WebApp-Cron2444 --user-data-dir=/home/johnc/.local/share/ice/profiles/Cron2444 &

View File

@ -11,12 +11,14 @@ M.options = {
}
M.ui = {
theme = "everforest",
theme_toggle = { "everforest", "everforest_light" },
theme = "everblush",
theme_toggle = { "everblush", "everblush" },
lazyload = false,
}
M.mappings = require "custom.mappings"
-- require("telescope").load_extension "git_worktree"
vim.cmd "autocmd BufRead,BufEnter *.astro set filetype=astro"
vim.cmd "set rnu"
vim.cmd "autocmd InsertLeave *.tex update"

View File

@ -2,7 +2,7 @@ local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"
local servers = { "tsserver", "tailwindcss", "cssls", "prismals", "gopls", "yamlls", "hls" }
local servers = { "vtsls", "tailwindcss", "cssls", "prismals", "gopls", "yamlls", "hls", "metals", "zls" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
@ -10,3 +10,53 @@ for _, lsp in ipairs(servers) do
capabilities = capabilities,
}
end
require("lspconfig").eslint.setup {
-- Copied from nvim-lspconfig/lua/lspconfig/server_conigurations/eslint.js
root_dir = lspconfig.util.root_pattern(
".eslintrc",
".eslintrc.js",
".eslintrc.cjs",
".eslintrc.yaml",
".eslintrc.yml",
".eslintrc.json"
-- Disabled to prevent "No ESLint configuration found" exceptions
-- 'package.json',
),
}
--[[
local function filter(arr, fn)
if type(arr) ~= "table" then
return arr
end
local filtered = {}
for k, v in pairs(arr) do
if fn(v, k, arr) then
table.insert(filtered, v)
end
end
return filtered
end
local function filterReactDTS(value)
return string.match(value.targetUri, 'node_modules/@types/react/ts5.0/index.d.ts') == nil
end
lspconfig.vtsls.setup {
-- other options
handlers = {
['textDocument/definition'] = function(err, result, method, ...)
if vim.tbl_islist(result) and #result > 1 then
local filtered_result = filter(result, filterReactDTS)
return vim.lsp.handlers['textDocument/definition'](err, filtered_result, method, ...)
end
vim.lsp.handlers['textDocument/definition'](err, result, method, ...)
end
}
}
]]--

View File

@ -32,6 +32,11 @@ M.custom = {
["<leader>rf"] = { ":lua require('refactoring').select_refactor()<CR>", "options" },
["<leader>q"] = { ":lua require('harpoon.mark').add_file()<CR>" },
["<leader>fp"] = { ":lua require('harpoon.ui').toggle_quick_menu()<CR>" },
["<leader>lt"] = { ":lua require('telescope').extensions.git_worktree.git_worktrees()<CR>" },
["<leader>wt"] = { ":lua require('telescope').extensions.git_worktree.create_git_worktree()<CR>" },
["<leader>gr"] = { ":lua require('telescope.builtin').lsp_references()<CR>" },
["<A-k>"] = {
function()
if lazyGitted then

View File

@ -15,12 +15,44 @@ return {
require "custom.lspconfig"
end,
},
{
"windwp/nvim-ts-autotag",
event = "InsertEnter",
config = function()
require("nvim-ts-autotag").setup()
end,
},
{ "windwp/nvim-ts-autotag", lazy = false },
{ "lervag/vimtex", lazy = false },
{ "sindrets/diffview.nvim", lazy = false },
{ "ThePrimeagen/harpoon" },
{ "christoomey/vim-tmux-navigator", lazy = false },
{ "jose-elias-alvarez/null-ls.nvim" },
{ "sainnhe/everforest", lazy = false },
{
"JohnCosta27/git-worktree.nvim",
config = function()
local Worktree = require "git-worktree"
-- op = Operations.Switch, Operations.Create, Operations.Delete
-- metadata = table of useful values (structure dependent on op)
-- Switch
-- path = path you switched to
-- prev_path = previous worktree path
-- Create
-- path = path where worktree created
-- branch = branch name
-- upstream = upstream remote name
-- Delete
-- path = path where worktree deleted
Worktree.on_tree_change(function(op, metadata)
if op ~= Worktree.Operations.Delete then
-- os.execute()
end
end)
end,
},
{
"NvChad/nvterm",
config = function()