big update again

This commit is contained in:
Michael Thomson 2024-09-05 07:22:41 -04:00
parent 7c6f52de48
commit dde724ef34
No known key found for this signature in database
18 changed files with 452 additions and 360 deletions

203
flake.lock generated
View File

@ -1,5 +1,150 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1725234343,
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
],
"nixpkgs-stable": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1724857454,
"narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"neovim-nightly-overlay",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1724947644,
"narHash": "sha256-MHHrHasTngp7EYQOObHJ1a/IsRF+wodHqOckhH6uZbk=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "dba4367b9a9d9615456c430a6d6af716f6e84cef",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -20,6 +165,45 @@
"type": "github" "type": "github"
} }
}, },
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1725415370,
"narHash": "sha256-F5Obt4M07Jal6P0QMkbL9Qrsux7CmhbmEuO4d1NWOrk=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "fdc7d407e29b17633d2568b5f46ead383ef85172",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"type": "github"
}
},
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1725402926,
"narHash": "sha256-FEwqYuoLu5gZ6Kc8DWTKAWAR0iZ6dSvdIC9RARLKhWc=",
"owner": "neovim",
"repo": "neovim",
"rev": "7b7c95dac97d6ea4f10855cc198dce650a796c20",
"type": "github"
},
"original": {
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -57,6 +241,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1725103162, "lastModified": 1725103162,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
@ -75,9 +275,10 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
} }
} }
}, },

View File

@ -12,6 +12,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
}; };
outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, nixos-hardware, ... }: { outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, nixos-hardware, ... }: {

View File

@ -27,12 +27,13 @@
enableZshIntegration = true; # see note on other shells below enableZshIntegration = true; # see note on other shells below
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
spotify-player = {
enable = true;
};
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
btop btop
spotify
spotify-player
neofetch neofetch
jq jq
tldr tldr
@ -57,6 +58,7 @@
calcurse calcurse
glow glow
gcc gcc
luajit
]; ];
programs.home-manager.enable = true; programs.home-manager.enable = true;

View File

@ -10,14 +10,6 @@
source = ./calendar-password.sh; source = ./calendar-password.sh;
executable = true; executable = true;
}; };
"work-calendar-client-id.sh" = {
source = ./work-calendar-client-id.sh;
executable = true;
};
"work-calendar-client-secret.sh" = {
source = ./work-calendar-client-secret.sh;
executable = true;
};
}; };
services = { services = {
@ -164,22 +156,6 @@
enable = true; enable = true;
}; };
}; };
accounts.work = {
primary = false;
flavor = "gmail.com";
address = "mthomson@konradgroup.com";
realName = "Michael Thomson";
aerc = {
enable = true;
extraAccounts = { source = "maildir://~/Maildir/work"; };
};
notmuch = {
enable = true;
};
lieer = {
enable = true;
};
};
}; };
calendar = { calendar = {
basePath = ".calendar"; basePath = ".calendar";
@ -210,28 +186,6 @@
color = "#f2d5cf"; color = "#f2d5cf";
}; };
}; };
accounts.work = {
primary = false;
remote = {
type = "google_calendar";
};
vdirsyncer = {
enable = true;
collections = [ "from a" "from b" ];
clientIdCommand = [
"~/work-calendar-client-id.sh"
];
clientSecretCommand = [
"~/work-calendar-client-secret.sh"
];
tokenFile = "~/token_file";
};
khal = {
enable = true;
type = "discover";
color = "#e78284";
};
};
}; };
}; };
} }

View File

@ -1,14 +1,18 @@
{ pkgs, config, ... }: { inputs, pkgs, config, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
fzf fzf
ripgrep ripgrep
luarocks luarocks
luajit
lua-language-server
nil
]; ];
programs.neovim = { programs.neovim = {
enable = true; enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
}; };
home.file.".config/nvim/" = { home.file.".config/nvim/" = {

View File

@ -1,5 +1,3 @@
local api = vim.api
local g = vim.g
local opt = vim.opt local opt = vim.opt
-- Bootstrap lazy.nvim -- Bootstrap lazy.nvim
@ -19,11 +17,6 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
-- Remap leader and local leader to <Space>
api.nvim_set_keymap("", "<Space>", "<Nop>", { noremap = true, silent = true })
g.mapleader = " "
g.maplocalleader = ","
-- Setup lazy.nvim -- Setup lazy.nvim
require("lazy").setup({ require("lazy").setup({
spec = { spec = {
@ -33,34 +26,20 @@ require("lazy").setup({
checker = { enabled = true }, checker = { enabled = true },
}) })
vim.cmd 'colorscheme catppuccin-frappe'
-- Load core settings -- Load core settings
opt.termguicolors = true -- Enable colors in terminal
opt.hlsearch = false -- turn off highlight on search opt.hlsearch = false -- turn off highlight on search
opt.incsearch = true -- Keep incremental highlighting on search
opt.number = true --Make line numbers default
opt.relativenumber = true --Make relative number default opt.relativenumber = true --Make relative number default
opt.mouse = "a" --Enable mouse mode
opt.breakindent = true --Enable break indent
opt.undofile = true --Save undo history
opt.ignorecase = true --Case insensitive searching unless /C or capital in search
opt.smartcase = true -- Smart case
opt.updatetime = 50 --Decrease update time opt.updatetime = 50 --Decrease update time
opt.signcolumn = 'yes' -- Always show sign column
opt.clipboard = 'unnamedplus' -- Access system clipboard opt.clipboard = 'unnamedplus' -- Access system clipboard
opt.laststatus = 3 -- Global status line opt.laststatus = 3 -- Global status line
opt.swapfile = false opt.swapfile = false
opt.wrap = false
vim.opt_local.conceallevel = 2 vim.opt_local.conceallevel = 2
vim.opt.inccommand = 'split' vim.opt.inccommand = 'split'
-- Time in milliseconds to wait for a mapped sequence to complete. -- Time in milliseconds to wait for a mapped sequence to complete.
opt.timeoutlen = 300 opt.timeoutlen = 300
opt.showmode = false -- Do not need to show the mode. We use the statusline instead.
opt.scrolloff = 10 -- Lines of context opt.scrolloff = 10 -- Lines of context
opt.smartindent = true --Smart indent
opt.expandtab = true opt.expandtab = true
opt.smarttab = true opt.smarttab = true
opt.textwidth = 0 opt.textwidth = 0
@ -68,15 +47,8 @@ opt.autoindent = true
opt.shiftwidth = 2 opt.shiftwidth = 2
opt.tabstop = 2 opt.tabstop = 2
opt.softtabstop = 2 opt.softtabstop = 2
opt.splitbelow = true
opt.splitright = true
opt.cursorline = true
opt.guifont = "Iosevka Nerd Font Mono" opt.guifont = "Iosevka Nerd Font Mono"
-- Remappings
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("n", "<C-d>", "<C-d>zz") vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz") vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "n", "nzzzv")
@ -90,16 +62,4 @@ vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
vim.keymap.set("n", "Q", "<nop>") vim.keymap.set("n", "Q", "<nop>")
vim.keymap.set("n", "<c-f>", "<nop>") vim.keymap.set("n", "<c-f>", "<nop>")
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
vim.keymap.set("n", "J", "mzJ`z")
vim.keymap.set("i", "jk", "<Esc>") vim.keymap.set("i", "jk", "<Esc>")
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})

View File

@ -1,24 +0,0 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = {
integrations = {
cmp = true,
gitsigns = true,
treesitter = true,
fidget = true,
harpoon = true,
leap = true,
mason = true,
mini = {
enabled = true,
},
neotest = true,
markdown = true,
telescope = {
enabled = true,
},
},
},
}

View File

@ -1,10 +0,0 @@
return {
'j-hui/fidget.nvim',
opts = {
notification = {
window = {
winblend = 0,
},
}
}
}

View File

@ -1,12 +0,0 @@
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
}
}
}

View File

@ -1,6 +0,0 @@
return {
'ggandor/leap.nvim',
config = function()
require("leap").set_default_keymaps()
end
}

View File

@ -1,52 +0,0 @@
return { -- Linting
'mfussenegger/nvim-lint',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local lint = require 'lint'
lint.linters_by_ft = {
vue = { 'stylelint' },
}
-- To allow other plugins to add linters to require('lint').linters_by_ft,
-- instead set linters_by_ft like this:
-- lint.linters_by_ft = lint.linters_by_ft or {}
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
--
-- However, note that this will enable a set of default linters,
-- which will cause errors unless these tools are available:
-- {
-- clojure = { "clj-kondo" },
-- dockerfile = { "hadolint" },
-- inko = { "inko" },
-- janet = { "janet" },
-- json = { "jsonlint" },
-- markdown = { "vale" },
-- rst = { "vale" },
-- ruby = { "ruby" },
-- terraform = { "tflint" },
-- text = { "vale" }
-- }
--
-- You can disable the default linters by setting their filetypes to nil:
-- lint.linters_by_ft['clojure'] = nil
-- lint.linters_by_ft['dockerfile'] = nil
-- lint.linters_by_ft['inko'] = nil
-- lint.linters_by_ft['janet'] = nil
-- lint.linters_by_ft['json'] = nil
-- lint.linters_by_ft['markdown'] = nil
-- lint.linters_by_ft['rst'] = nil
-- lint.linters_by_ft['ruby'] = nil
-- lint.linters_by_ft['terraform'] = nil
-- lint.linters_by_ft['text'] = nil
-- Create autocommand which carries out the actual linting
-- on the specified events.
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
require('lint').try_lint()
end,
})
end,
}

View File

@ -1,112 +1,183 @@
return { return {
'VonHeikemen/lsp-zero.nvim', {
branch = 'v3.x', 'folke/lazydev.nvim',
dependencies = { ft = 'lua',
-- LSP Support opts = {
{'neovim/nvim-lspconfig'}, -- Required library = {
-- {'williamboman/mason.nvim'}, -- Optional { path = 'luvit-meta/library', words = { 'vim%.uv' } },
-- {'williamboman/mason-lspconfig.nvim'}, -- Optional },
},
-- Autocompletion
{'hrsh7th/nvim-cmp'}, -- Required
{'hrsh7th/cmp-nvim-lsp'}, -- Required
{'L3MON4D3/LuaSnip'}, -- Required
{'saadparwaiz1/cmp_luasnip'},
{'onsails/lspkind.nvim'} -- Optional
}, },
config = function() { 'Bilal2453/luvit-meta', lazy = true },
local lsp_zero = require('lsp-zero') {
'neovim/nvim-lspconfig',
cmd = 'LspInfo',
event = {'BufReadPre', 'BufNewFile'},
config = function()
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }),
callback = function(event)
local map = function(keys, func, desc, mode)
mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
end
lsp_zero.on_attach(function(client, bufnr) map("gd", function() vim.lsp.buf.definition() end, 'goto defintion')
local opts = {buffer = bufnr, remap = false} map("gr", function() vim.lsp.buf.references() end, 'goto references')
map("K", function() vim.lsp.buf.hover() end, 'hover')
map("<leader>ws", function() vim.lsp.buf.workspace_symbol() end, 'workspace symbols')
map("<leader>d", function() vim.diagnostic.open_float() end, 'diagnostic float')
map("[d", function() vim.diagnostic.jump({ count = 1, float = true }) end, 'next diagnostic')
map("]d", function() vim.diagnostic.jump({ count = -1, float = true }) end, 'prev diagnostic')
map("<leader>ca", function() vim.lsp.buf.code_action() end, 'code actions')
map("<leader>rn", function() vim.lsp.buf.rename() end, 'rename')
map("<C-h>", function() vim.lsp.buf.signature_help() end, 'signature help', "i")
end
})
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) local capabilities = vim.lsp.protocol.make_client_capabilities()
vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts) capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>ws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>d", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set("n", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>rn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
end)
-- Mason Config -- Server configs
-- require('mason').setup({}) local lsp = require('lspconfig')
-- require('mason-lspconfig').setup({
-- ensure_installed = {},
-- handlers = {
-- lsp_zero.default_setup,
-- }
-- })
-- cmp Config -- vue
lsp.volar.setup({
capabilities = capabilities,
})
local cmp = require('cmp') -- typescript / javascript
local cmp_action = require('lsp-zero').cmp_action() require'lspconfig'.ts_ls.setup{
capabilities = capabilities,
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = "",
languages = {"javascript", "typescript", "vue"},
},
},
},
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue" }
}
cmp.setup({ -- eslint
sources = { lsp.eslint.setup({
{name = 'path'}, capabilities = capabilities,
{name = 'nvim_lsp'}, })
{name = 'nvim_lua'},
{name = 'luasnip'}, -- tailwind
{name = 'cmp_luasnip'}, lsp.tailwindcss.setup({
{name = 'buffer'}, capabilities = capabilities,
{name = 'neorg'} root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts')
})
-- html
lsp.html.setup({
capabilities = capabilities,
})
-- go
lsp.gopls.setup({
capabilities = capabilities,
settings = {
gopls = {
usePlaceholders = true,
}
}
})
lsp.golangci_lint_ls.setup({
capabilities = capabilities,
})
-- templ
vim.filetype.add({ extension = { templ = "templ" } })
lsp.templ.setup({
capabilities = capabilities,
})
lsp.lua_ls.setup({
capabilities = capabilities,
})
lsp.nil_ls.setup({
capabilities = capabilities,
})
end,
},
{
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
{
'L3MON4D3/LuaSnip',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
}, },
window = { 'saadparwaiz1/cmp_luasnip',
completion = cmp.config.window.bordered(), 'hrsh7th/cmp-nvim-lsp',
documentation = cmp.config.window.bordered(), 'hrsh7th/cmp-path',
}, },
formatting = { config = function()
fields = {'abbr', 'kind', 'menu'}, -- See `:help cmp`
format = require('lspkind').cmp_format({ local cmp = require 'cmp'
mode = 'symbol', -- show only symbol annotations local luasnip = require 'luasnip'
maxwidth = 50, -- prevent the popup from showing more than provided characters luasnip.config.setup {}
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
})
},
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({select = false}),
-- scroll up and down the documentation window
['<C-u>'] = cmp.mapping.scroll_docs(-4),
['<C-d>'] = cmp.mapping.scroll_docs(4),
-- ['<Tab>'] = cmp_action.luasnip_supertab(),
-- ['<S-Tab>'] = cmp_action.luasnip_shift_supertab(),
}),
})
-- Server configs cmp.setup {
local lsp = require('lspconfig') snippet = {
expand = function(args)
-- vue luasnip.lsp_expand(args.body)
lsp.volar.setup({}) end,
},
-- typescript / javascript completion = { completeopt = 'menu,menuone,noinsert' },
require'lspconfig'.tsserver.setup{ mapping = cmp.mapping.preset.insert {
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue" } ['<C-n>'] = cmp.mapping.select_next_item(),
} ['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
-- eslint ['<C-f>'] = cmp.mapping.scroll_docs(4),
lsp.eslint.setup({}) ['<C-y>'] = cmp.mapping.confirm { select = true },
['<C-Space>'] = cmp.mapping.complete {},
-- tailwind ['<C-l>'] = cmp.mapping(function()
lsp.tailwindcss.setup({ if luasnip.expand_or_locally_jumpable() then
root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts') luasnip.expand_or_jump()
}) end
end, { 'i', 's' }),
-- html ['<C-h>'] = cmp.mapping(function()
lsp.html.setup({}) if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
-- go end
lsp.gopls.setup({}) end, { 'i', 's' }),
lsp.golangci_lint_ls.setup{} },
sources = {
-- templ {
vim.filetype.add({ extension = { templ = "templ" } }) name = 'lazydev',
lsp.templ.setup{} -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
group_index = 0,
end, },
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
},
}
end,
},
{
'nvim-tree/nvim-web-devicons',
}
} }

View File

@ -1,12 +0,0 @@
return {
"L3MON4D3/LuaSnip",
dependencies = { "rafamadriz/friendly-snippets" },
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
config = function ()
require('luasnip.loaders.from_vscode').lazy_load()
end
}

View File

@ -1,5 +1,6 @@
return { -- Collection of various small independent plugins/modules return { -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim', 'echasnovski/mini.nvim',
version = false,
config = function() config = function()
local keymap = vim.keymap.set local keymap = vim.keymap.set
@ -14,17 +15,37 @@ return { -- Collection of various small independent plugins/modules
return '%2l:%-2v' return '%2l:%-2v'
end end
require('mini.basics').setup({
options = {
extra_ui = true,
win_borders = "bold"
}
})
require('mini.comment').setup() require('mini.comment').setup()
require('mini.icons').setup() -- local icons = require('mini.icons')
-- icons.setup()
-- icons.tweak_lsp_kind()
require('mini.cursorword').setup() require('mini.indentscope').setup({
draw = {
delay = 0,
animation = require('mini.indentscope').gen_animation.none()
}
})
require('mini.diff').setup()
require('mini.extra').setup() require('mini.extra').setup()
files = require('mini.files') require('mini.jump').setup()
require('mini.jump2d').setup()
local files = require('mini.files')
files.setup() files.setup()
keymap("n", "<leader>fe", files.open, { noremap = true, silent = true }) keymap("n", "<leader>fe", function() files.open(vim.api.nvim_buf_get_name(0)) end, { noremap = true, silent = true })
require('mini.git').setup() require('mini.git').setup()
@ -53,10 +74,43 @@ return { -- Collection of various small independent plugins/modules
keymap("n", "<leader>ff", pick.builtin.files, { noremap = true, silent = true }) keymap("n", "<leader>ff", pick.builtin.files, { noremap = true, silent = true })
keymap("n", "<leader>fg", pick.builtin.grep_live, { noremap = true, silent = true }) keymap("n", "<leader>fg", pick.builtin.grep_live, { noremap = true, silent = true })
keymap("n", "<leader>fwg", function() keymap("n", "<leader>fwg", function()
local wrd = vim.fn.expand("<cWORD>") local wrd = vim.fn.expand("<cword>")
pick.builtin.grep_live({ pattern = wrd }) pick.builtin.grep_live({ pattern = wrd })
end, { noremap = true, silent = true }) end, { noremap = true, silent = true })
-- require('mini.base16').setup({
-- palette = {
-- base00 = "#303446",
-- base01 = "#292c3c",
-- base02 = "#414559",
-- base03 = "#51576d",
-- base04 = "#626880",
-- base05 = "#c6d0f5",
-- base06 = "#f2d5cf",
-- base07 = "#babbf1",
-- base08 = "#e78284",
-- base09 = "#ef9f76",
-- base0A = "#e5c890",
-- base0B = "#a6d189",
-- base0C = "#81c8be",
-- base0D = "#8caaee",
-- base0E = "#ca9ee6",
-- base0F = "#eebebe",
-- }
-- })
--
-- require('mini.hues').setup({
-- foreground = '#fbf7f0',
-- background = '#000000',
-- n_hues = 4,
-- accent = 'bg',
-- saturation = 'high'
-- })
-- require('mini.completion').setup()
require('mini.splitjoin').setup()
require('mini.trailspace').setup()
end, end,
} }

View File

@ -1,43 +0,0 @@
return {
"nvim-neorg/neorg",
lazy = false,
version = "*",
config = function()
require("neorg").setup({
load = {
["core.defaults"] = {},
["core.completion"] = { config = { engine = "nvim-cmp", name = "[Neorg]" } },
["core.integrations.nvim-cmp"] = {},
["core.concealer"] = {},
["core.keybinds"] = {
config = {
default_keybinds = true,
},
},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/notes",
}
}
},
["core.esupports.metagen"] = { config = { type = "auto", update_date = true } },
["core.qol.toc"] = {},
["core.qol.todo_items"] = {},
["core.looking-glass"] = {},
["core.presenter"] = { config = { zen_mode = "zen-mode" } },
["core.export"] = {},
["core.export.markdown"] = { config = { extensions = "all" } },
["core.summary"] = {},
["core.tangle"] = { config = { report_on_empty = false } },
["core.ui.calendar"] = {},
["core.journal"] = {
config = {
strategy = "flat",
workspace = "notes",
},
},
},
})
end,
}

View File

@ -1,3 +0,0 @@
return {
'windwp/nvim-ts-autotag',
}

View File

@ -0,0 +1,7 @@
return {
"shatur/neovim-ayu",
config = function()
require('ayu').setup({})
vim.cmd.colorscheme "ayu"
end
}

View File

@ -5,7 +5,7 @@
enable = true; enable = true;
extraConfig = '' extraConfig = ''
return { return {
color_scheme = 'catppuccin-frappe', color_scheme = 'Ayu Dark (Gogh)',
font = wezterm.font('Iosevka Nerd Font'), font = wezterm.font('Iosevka Nerd Font'),
font_size = 16, font_size = 16,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
@ -27,7 +27,7 @@
top = 0, top = 0,
bottom = 0, bottom = 0,
}, },
window_background_opacity = 0.90, window_background_opacity = 1,
macos_window_background_blur = 0, macos_window_background_blur = 0,
front_end = "WebGpu", front_end = "WebGpu",
} }