migrate
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
---
|
||||
tags:
|
||||
- Chezmoi
|
||||
- Desktop
|
||||
---
|
||||
# dotfiles
|
||||
|
||||
This repo contains the configuration to setup my machines. This is using [Chezmoi](https://chezmoi.io), the dotfile manager to setup the install.
|
||||
|
||||
This automated setup is currently only configured for Fedora machines.
|
||||
|
||||
## How to run
|
||||
|
||||
```shell
|
||||
export GITHUB_USERNAME=logandonley
|
||||
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply $GITHUB_USERNAME
|
||||
```
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
---
|
||||
- name: Machine setup
|
||||
hosts: localhost
|
||||
become: true
|
||||
connection: local
|
||||
gather_facts: true
|
||||
vars:
|
||||
flyctl_version: "0.1.130"
|
||||
pulumi_version: "v3.94.2"
|
||||
|
||||
tasks:
|
||||
- name: Get my user
|
||||
ansible.builtin.set_fact:
|
||||
remote_regular_user: "{{ ansible_env.SUDO_USER or ansible_user_id }}"
|
||||
|
||||
- name: Install packages
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- git
|
||||
- htop
|
||||
- vim
|
||||
- firefox
|
||||
- gh
|
||||
- gnome-tweaks
|
||||
- gcc
|
||||
- helm
|
||||
- go-task
|
||||
- ripgrep
|
||||
- poetry
|
||||
- zsh
|
||||
- fzf
|
||||
- tmux
|
||||
- ffmpeg-free
|
||||
- zlib
|
||||
- zlib-devel
|
||||
- make
|
||||
- patch
|
||||
- bzip2
|
||||
- bzip2-devel
|
||||
- readline-devel
|
||||
- sqlite
|
||||
- sqlite-devel
|
||||
- openssl-devel
|
||||
- tk-devel
|
||||
- libffi-devel
|
||||
- xz-devel
|
||||
- libuuid-devel
|
||||
- gdbm-libs
|
||||
- libnsl2
|
||||
- luarocks
|
||||
- wl-clipboard
|
||||
- fd-find
|
||||
- gcc-c++
|
||||
- doctl
|
||||
- helix
|
||||
- "@Development Tools"
|
||||
- "@C Development Tools and Libraries"
|
||||
- autoconf
|
||||
- ncurses-devel
|
||||
- wxGTK-devel
|
||||
- wxBase
|
||||
- java-1.8.0-openjdk-devel
|
||||
- libiodbc
|
||||
- unixODBC-devel.x86_64
|
||||
- erlang-odbc.x86_64
|
||||
- libxslt
|
||||
- fop
|
||||
- podman-compose
|
||||
- inotify-tools
|
||||
- blender
|
||||
- toilet
|
||||
- dotnet-sdk-8.0
|
||||
- unar
|
||||
state: present
|
||||
|
||||
- name: Change shell to zsh
|
||||
ansible.builtin.user:
|
||||
name: "{{ remote_regular_user }}"
|
||||
shell: /usr/bin/zsh
|
||||
|
||||
- name: Add Brave Browser Repo
|
||||
ansible.builtin.yum_repository:
|
||||
name: brave-browser
|
||||
description: Brave Browser
|
||||
baseurl: https://brave-browser-rpm-release.s3.brave.com/x86_64/
|
||||
gpgkey: https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
||||
gpgcheck: true
|
||||
enabled: true
|
||||
|
||||
- name: Import Brave Browser GPG Key
|
||||
ansible.builtin.rpm_key:
|
||||
key: https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
||||
state: present
|
||||
|
||||
- name: Install Brave Browser
|
||||
ansible.builtin.dnf:
|
||||
name: brave-browser
|
||||
state: present
|
||||
|
||||
- name: Import Microsoft GPG Key
|
||||
ansible.builtin.rpm_key:
|
||||
key: https://packages.microsoft.com/keys/microsoft.asc
|
||||
state: present
|
||||
|
||||
- name: Add Visual Studio Code Repo
|
||||
ansible.builtin.yum_repository:
|
||||
name: vscode
|
||||
description: Visual Studio Code
|
||||
baseurl: https://packages.microsoft.com/yumrepos/vscode
|
||||
gpgkey: https://packages.microsoft.com/keys/microsoft.asc
|
||||
gpgcheck: true
|
||||
enabled: true
|
||||
|
||||
- name: Install VS Code
|
||||
ansible.builtin.dnf:
|
||||
name: code
|
||||
state: present
|
||||
|
||||
- name: Add Docker repo
|
||||
ansible.builtin.yum_repository:
|
||||
name: docker
|
||||
description: Docker repo
|
||||
baseurl: "https://download.docker.com/linux/fedora/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/stable"
|
||||
gpgkey: "https://download.docker.com/linux/fedora/gpg"
|
||||
gpgcheck: true
|
||||
enabled: true
|
||||
|
||||
- name: Install Docker
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-buildx-plugin
|
||||
- docker-compose-plugin
|
||||
state: present
|
||||
|
||||
- name: Add Docker group
|
||||
ansible.builtin.group:
|
||||
name: docker
|
||||
state: present
|
||||
|
||||
- name: Add user to docker group
|
||||
ansible.builtin.user:
|
||||
name: "{{ remote_regular_user }}"
|
||||
groups: docker
|
||||
append: true
|
||||
|
||||
- name: Add kubectl repo
|
||||
ansible.builtin.yum_repository:
|
||||
name: Kubernetes
|
||||
description: Kubernetes repo
|
||||
baseurl: https://pkgs.k8s.io/core:/stable:/v1.28/rpm/
|
||||
gpgkey: https://pkgs.k8s.io/core:/stable:/v1.28/rpm/repodata/repomd.xml.key
|
||||
gpgcheck: true
|
||||
enabled: true
|
||||
|
||||
- name: Install kubectl
|
||||
ansible.builtin.dnf:
|
||||
name: kubectl
|
||||
state: present
|
||||
|
||||
- name: Add Hashicorp Repo
|
||||
ansible.builtin.yum_repository:
|
||||
name: hashicorp
|
||||
description: Hashicorp repo
|
||||
baseurl: https://rpm.releases.hashicorp.com/fedora/$releasever/$basearch/stable
|
||||
gpgkey: https://rpm.releases.hashicorp.com/gpg
|
||||
gpgcheck: true
|
||||
enabled: true
|
||||
|
||||
- name: Install Terraform
|
||||
ansible.builtin.dnf:
|
||||
name: terraform
|
||||
state: present
|
||||
|
||||
- name: Check if Pulumi is installed
|
||||
ansible.builtin.command:
|
||||
cmd: pulumi version
|
||||
register: pulumi_installed
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Download Pulumi SDK
|
||||
ansible.builtin.get_url:
|
||||
url: "https://get.pulumi.com/releases/sdk/pulumi-{{ pulumi_version }}-linux-x64.tar.gz"
|
||||
dest: "/tmp/pulumi-{{ pulumi_version }}-linux-x64.tar.gz"
|
||||
mode: "0644"
|
||||
when: pulumi_installed is failed or pulumi_installed.stdout is not search(pulumi_version)
|
||||
|
||||
- name: Extract Pulumi to /usr/local/bin
|
||||
ansible.builtin.unarchive:
|
||||
src: "/tmp/pulumi-{{ pulumi_version }}-linux-x64.tar.gz"
|
||||
dest: /usr/local/bin
|
||||
extra_opts: [--strip-components=1]
|
||||
creates: /usr/local/bin/pulumi
|
||||
when: pulumi_installed is failed or pulumi_installed.stdout is not search(pulumi_version)
|
||||
|
||||
- name: Check if the targeted version of flyctl is installed
|
||||
ansible.builtin.command: flyctl version
|
||||
register: installed_flyctl_version
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Download flyctl tar.gz
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/superfly/flyctl/releases/download/v{{ flyctl_version }}/flyctl_{{ flyctl_version }}_Linux_x86_64.tar.gz"
|
||||
dest: "/tmp/flyctl_{{ flyctl_version }}_Linux_x86_64.tar.gz"
|
||||
mode: "0644"
|
||||
when: flyctl_version not in installed_flyctl_version.stdout
|
||||
|
||||
- name: Extract flyctl to /usr/local/bin
|
||||
ansible.builtin.unarchive:
|
||||
src: "/tmp/flyctl_{{ flyctl_version }}_Linux_x86_64.tar.gz"
|
||||
dest: "/usr/local/bin"
|
||||
remote_src: true
|
||||
when: flyctl_version not in installed_flyctl_version.stdout
|
||||
|
||||
- name: Install Flatpak packages
|
||||
community.general.flatpak:
|
||||
name:
|
||||
- com.obsproject.Studio
|
||||
- org.videolan.VLC
|
||||
- org.tenacityaudio.Tenacity
|
||||
- md.obsidian.Obsidian
|
||||
- org.gimp.GIMP
|
||||
- rest.insomnia.Insomnia
|
||||
- com.github.johnfactotum.Foliate
|
||||
- org.gnome.meld
|
||||
- org.sqlitebrowser.sqlitebrowser
|
||||
state: present
|
||||
|
||||
- name: Ensure fonts directory
|
||||
ansible.builtin.file:
|
||||
path: "~{{ remote_regular_user }}/.fonts"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: "{{ remote_regular_user }}"
|
||||
|
||||
- name: Check if Jetbrains Mono exists
|
||||
ansible.builtin.shell: "ls ~{{ remote_regular_user }}/.fonts/JetBrainsMonoNerd*FontMono*"
|
||||
register: jetbrains_mono_exists
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Download Jetbrains mono
|
||||
when: jetbrains_mono_exists is failed
|
||||
ansible.builtin.unarchive:
|
||||
src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/JetBrainsMono.zip
|
||||
dest: "~{{ remote_regular_user }}/.fonts/"
|
||||
remote_src: true
|
||||
mode: "0755"
|
||||
owner: "{{ remote_regular_user }}"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
|
||||
custom-command='zsh'
|
||||
font='JetBrainsMono Nerd Font 18'
|
||||
palette=['rgb(7,54,66)', 'rgb(220,50,47)', 'rgb(133,153,0)', 'rgb(181,137,0)', 'rgb(38,139,210)', 'rgb(211,54,130)', 'rgb(42,161,152)', 'rgb(238,232,213)', 'rgb(0,43,54)', 'rgb(203,75,22)', 'rgb(88,110,117)', 'rgb(101,123,131)', 'rgb(131,148,150)', 'rgb(108,113,196)', 'rgb(147,161,161)', 'rgb(253,246,227)']
|
||||
use-custom-command=true
|
||||
use-system-font=false
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
column_width = 160
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "None"
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
vim.g.mapleader = " "
|
||||
|
||||
require("options")
|
||||
require("keymaps")
|
||||
require("lazy").setup("plugins")
|
||||
require("setup-lsp")
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "57c9f5c31b3d712376c704673eac8e948c82e9c1" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"copilot.lua": { "branch": "master", "commit": "dcaaed5b58e6c2d395bca18d25d34e6384856722" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "9031087ff1b18d0a34bd664719ec66cc8be1efd8" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" },
|
||||
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "be6bf4f5d2d3b173c9291f074130a3d29e1af78a" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "ef09f14eab78ca6ce3bee1ddc73db5511f5cd953" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "eb81c7ea08d6f01d5fa4cf09e58c708efadf9b2f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "24be1534dbd062907842601ae1e2e953ba02472e" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "ce58193226fa72302ad0732aa61d6a4bec3f0789" },
|
||||
"oxocarbon.nvim": { "branch": "main", "commit": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
vim.keymap.set('n', '<leader>L', "<cmd>Lazy<CR>", { desc = 'Lazy' })
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = false
|
||||
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
vim.o.breakindent = true
|
||||
|
||||
vim.o.undofile = true
|
||||
|
||||
vim.o.smartcase = true
|
||||
vim.o.hlsearch = false
|
||||
|
||||
vim.o.termguicolors = true
|
||||
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.tabstop = 2
|
||||
vim.o.smartindent = true
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.confirm = true
|
||||
vim.o.cursorline = true
|
||||
vim.o.expandtab = true
|
||||
|
||||
vim.o.linebreak = true
|
||||
|
||||
-- vim.wo.signcolumn = 'yes'
|
||||
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeoutlen = 300
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
opts = {
|
||||
autotag = {
|
||||
enable = true,
|
||||
enable_rename = true,
|
||||
enable_close = true,
|
||||
enable_close_on_slash = true,
|
||||
}
|
||||
},
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
return { 'numToStr/Comment.nvim', opts = {} }
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
build = ":Copilot auth",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
keymap = {
|
||||
accept = "<C-l>",
|
||||
},
|
||||
},
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
yaml = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
'nvimdev/dashboard-nvim',
|
||||
event = 'VimEnter',
|
||||
config = function()
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
week_header = {
|
||||
enable = true,
|
||||
},
|
||||
shortcut = {
|
||||
{ desc = ' Update', group = '@property', action = 'Lazy update', key = 'u' },
|
||||
{
|
||||
icon = ' ',
|
||||
icon_hl = '@variable',
|
||||
desc = 'Files',
|
||||
group = 'Label',
|
||||
action = 'Telescope find_files',
|
||||
key = 'f',
|
||||
},
|
||||
{
|
||||
desc = ' dotfiles',
|
||||
group = 'Number',
|
||||
action = 'Telescope dotfiles',
|
||||
key = 'd',
|
||||
},
|
||||
{
|
||||
desc = ' obsidian',
|
||||
group = 'Number',
|
||||
action = 'Telescope find_files cwd=~/brain2',
|
||||
key = 'o',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
end,
|
||||
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'j-hui/fidget.nvim',
|
||||
opts = {}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
|
||||
local sources = {}
|
||||
sources[#sources + 1] = formatting.black
|
||||
|
||||
if vim.fn.executable("djlint") == 1 then
|
||||
sources[#sources + 1] = formatting.djlint.with({
|
||||
command = "djlint",
|
||||
args = { "--reformat", "-" },
|
||||
})
|
||||
end
|
||||
|
||||
sources[#sources + 1] = formatting.prettier
|
||||
sources[#sources + 1] = formatting.stylua
|
||||
sources[#sources + 1] = formatting.isort
|
||||
sources[#sources + 1] = diagnostics.flake8
|
||||
|
||||
|
||||
null_ls.setup({
|
||||
sources = sources,
|
||||
})
|
||||
end,
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require('harpoon')
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set("n", "<M-a>", function() harpoon:list():append() end)
|
||||
vim.keymap.set("n", "<M-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
||||
vim.keymap.set("n", "<M-j>", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<M-k>", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<M-l>", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<M-;>", function() harpoon:list():select(4) end)
|
||||
end,
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'folke/neodev.nvim',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'L3MON4D3/LuaSnip',
|
||||
"rafamadriz/friendly-snippets"
|
||||
},
|
||||
lazy = true,
|
||||
config = false
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = {
|
||||
theme = 'oxocarbon'
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"folke/neodev.nvim",
|
||||
opts = {}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>e", "<cmd>Neotree toggle<CR>", desc = "Neotree" }
|
||||
},
|
||||
opts = {
|
||||
window = {
|
||||
width = 30
|
||||
}
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*",
|
||||
lazy = true,
|
||||
ft = "markdown",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>os", "<cmd>ObsidianSearch<CR>", desc = "Obsidian search" },
|
||||
{ "<leader>on", "<cmd>ObsidianNew<CR>", desc = "Obsidian new" },
|
||||
{ "<leader>ot", "<cmd>ObsidianToday<CR>", desc = "Obsidian today" },
|
||||
{ "<leader>ol", "<cmd>ObsidianLink<CR>", desc = "Obsidian link" },
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "brain2",
|
||||
path = "~/brain2",
|
||||
},
|
||||
},
|
||||
templates = {
|
||||
subdir = "templates",
|
||||
date_format = "%Y-%m-%d",
|
||||
time_format = "%H:%M",
|
||||
},
|
||||
daily_notes = {
|
||||
folder = "daily",
|
||||
date_format = "%Y-%m-%d",
|
||||
alias_format = "%B %-d, %Y",
|
||||
template = 'daily.md'
|
||||
},
|
||||
},
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"nyoom-engineering/oxocarbon.nvim",
|
||||
config = function()
|
||||
vim.opt.background = "dark"
|
||||
vim.cmd.colorscheme "oxocarbon"
|
||||
end,
|
||||
priority = 1000,
|
||||
lazy = false
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.find_files, { desc = 'Find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Search buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Search helps' })
|
||||
vim.keymap.set('v', '<leader>fs', builtin.grep_string, { desc = 'Search selection' })
|
||||
vim.keymap.set('n', '<leader>fm', builtin.man_pages, { desc = 'Search man pages' })
|
||||
vim.keymap.set('n', '<leader>ft', builtin.filetypes, { desc = 'Search filetypes' })
|
||||
end
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "javascript", "html", "css", "python", "go", "tsx", "bash", "markdown", "markdown_inline", "http", "json" },
|
||||
auto_install = true,
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
local lspconfig = require('lspconfig')
|
||||
local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
desc = 'LSP actions',
|
||||
callback = function(event)
|
||||
local opts = { buffer = event.buf }
|
||||
|
||||
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
||||
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
||||
vim.keymap.set('n', '<leader>cr', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>cf', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
||||
vim.keymap.set('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||
|
||||
vim.keymap.set('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<cr>', opts)
|
||||
vim.keymap.set('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>', opts)
|
||||
vim.keymap.set('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>', opts)
|
||||
end
|
||||
})
|
||||
|
||||
local default_setup = function(server)
|
||||
lspconfig[server].setup({
|
||||
capabilities = lsp_capabilities,
|
||||
})
|
||||
end
|
||||
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
tsserver = {},
|
||||
pyright = {},
|
||||
html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
handlers = { default_setup },
|
||||
})
|
||||
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
},
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Enter key confirms completion item
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
|
||||
-- Ctrl + space triggers completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
. "$HOME/.cargo/env"
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export PATH="$HOME/.luarocks/bin:$PATH"
|
||||
|
||||
|
||||
# Added by Toolbox App
|
||||
export PATH="$PATH:/home/ldonley/.local/share/JetBrains/Toolbox/scripts"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
set -g mouse on
|
||||
set-option -g allow-rename off
|
||||
bind r source-file ~/.tmux.conf
|
||||
set-option -g history-limit 10000
|
||||
|
||||
# Resize panes
|
||||
bind -n M-H resize-pane -L 2
|
||||
bind -n M-J resize-pane -D 2
|
||||
bind -n M-K resize-pane -U 2
|
||||
bind -n M-L resize-pane -R 2
|
||||
|
||||
# panes
|
||||
set -g pane-border-style 'fg=color233 bg=color234'
|
||||
set -g pane-active-border-style 'bg=color234 fg=color46'
|
||||
|
||||
# status bar
|
||||
set -g status-position bottom
|
||||
set -g status-style 'bg=color233 fg=color15 dim'
|
||||
|
||||
# Fix the slow escape-time for vim
|
||||
set -sg escape-time 10
|
||||
|
||||
|
||||
# Setting up clipboard
|
||||
set-option -s set-clipboard off
|
||||
bind P paste-buffer
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
|
||||
unbind -T copy-mode-vi Enter
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'wl-copy'
|
||||
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'wl-copy'
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy'
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_on_fedora() {
|
||||
sudo dnf install -y ansible
|
||||
}
|
||||
|
||||
install_on_ubuntu() {
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ansible
|
||||
}
|
||||
|
||||
install_on_mac() {
|
||||
brew install ansible
|
||||
}
|
||||
|
||||
OS="$(uname -s)"
|
||||
case "${OS}" in
|
||||
Linux*)
|
||||
if [ -f /etc/fedora-release ]; then
|
||||
install_on_fedora
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
install_on_ubuntu
|
||||
else
|
||||
echo "Unsupported Linux distribution"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
Darwin*)
|
||||
install_on_mac
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported operating system: ${OS}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
ansible-playbook ~/.bootstrap/setup.yml --ask-become-pass
|
||||
|
||||
echo "Ansible installation complete."
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||
echo "Getting ohmyz.sh"
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc --skip-chsh
|
||||
else
|
||||
echo ".oh-my-zsh already found, skipping."
|
||||
fi
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install rust
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
||||
source $HOME/.cargo/env
|
||||
source ~/.profile
|
||||
|
||||
# Install cargo binstall
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
|
||||
# Install bob-nvim
|
||||
cargo binstall bob-nvim
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# .bootstrap/setup.yml hash: {{ include "dot_bootstrap/setup.yml" | sha256sum }}
|
||||
|
||||
if command -v ansible-playbook &> /dev/null; then
|
||||
ansible-playbook {{ joinPath .chezmoi.sourceDir "dot_bootstrap/setup.yml" | quote }} --ask-become-pass
|
||||
fi
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# .config/gnome-terminal-profiles.dconf hash: {{ include "dot_config/gnome-terminal-profiles.dconf" | sha256sum }}
|
||||
dconf load /org/gnome/terminal/legacy/profiles:/ < {{ joinPath .chezmoi.sourceDir "dot_config/gnome-terminal-profiles.dconf" | quote }}
|
||||
Reference in New Issue
Block a user