Skip to content

Commit

Permalink
WSL 2024-08-19 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
ADGEfficiency authored Dec 18, 2024
1 parent 7102f47 commit 5ec7503
Show file tree
Hide file tree
Showing 15 changed files with 306 additions and 340 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# can be either macos or ubuntu
# can be either macos or ubuntu
OS = macos

.PHONY: default bootstrap-stow dotfiles test setup-macos setup-ubuntu

default:
echo "hello ^^"

.PHONY: setup-macos setup-ubuntu boostrap-stow

setup-macos: brew-pkgs nix-pkgs dotfiles
bash ./tmux/setup.sh
bash ./scripts/setup-zpretzo.sh
Expand All @@ -21,6 +23,8 @@ setup-ubuntu: dotfiles nix-pkgs dotfiles
bootstrap-stow:
bash ./scripts/bootstrap-stow.sh

.PHONY: dotfiles test

STOW_ARGS=-vv
dotfiles: bootstrap-stow
stow $(STOW_ARGS) -d dotfiles -t $(HOME) $(OS)
Expand Down Expand Up @@ -67,7 +71,6 @@ setup-nix:
. ./nix/load-$(OS).sh && nix-channel --update

NIX_ARGS=--extra-experimental-features nix-command --extra-experimental-features flakes

nix-pkgs: setup-nix
. ./nix/load-$(OS).sh && cd nix && nix flake update $(NIX_ARGS) && nix profile install $(NIX_ARGS)

Expand Down
3 changes: 3 additions & 0 deletions dotfiles/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@
[user]
email = [email protected]
name = Adam Green

[rerere]
enabled = true
3 changes: 3 additions & 0 deletions dotfiles/common/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ export EDITOR=$(which nvim)
if command -v launchctl >/dev/null 2>&1; then
launchctl setenv XDG_CONFIG_HOME $XDG_CONFIG_HOME
fi

source $HOME/dotfiles/scripts/funcs.sh
source $HOME/dotfiles/scripts/aliases.sh
2 changes: 0 additions & 2 deletions dotfiles/common/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ alias brew='arch -arm64 brew'
source "$HOME/dotfiles/dotfiles/common/setup-path.sh"

source ~/dotfiles/macos/pyenv-flags
source $HOME/dotfiles/scripts/funcs.sh
source $HOME/dotfiles/scripts/aliases.sh

# custom ipython config
export IPYTHONDIR="$HOME/dotfiles/.ipython"
Expand Down
12 changes: 6 additions & 6 deletions nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions nix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@
lua
marksman
neovim
nerdfonts
nerd-fonts.fira-code
nodePackages_latest.markdownlint-cli
nodePackages_latest.prettier
nodePackages_latest.sql-formatter
nodePackages_latest.stylelint
nodejs_18
ov
pandoc
python311
ripgrep
ruby
shellcheck
Expand Down
3 changes: 2 additions & 1 deletion nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"conform.nvim": { "branch": "master", "commit": "667102f26106709cddd2dff1f699610df5b94d7f" },
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
"copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" },
"dbtpal": { "branch": "main", "commit": "c526f65a65063c314d180e79df301b339f080236" },
"emmet-vim": { "branch": "master", "commit": "6c511a8d7d2863066f32e25543e2bb99d505172c" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
"indent-blankline.nvim": { "branch": "master", "commit": "dddb5d21811c319eb6e51a993d8fb44b193aae3f" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/config/keymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ vim.keymap.set("n", "<leader>o", "<CMD>split | Oil<CR>")
-- CopilotChat
vim.keymap.set("n", "<leader>c", ":CopilotChat<CR>")

-- ZenMode
-- ZenMode Zoom
vim.keymap.set("n", "<leader>z", ":ZenMode<CR>")

-- Misc / Unused / Broken
Expand Down
4 changes: 2 additions & 2 deletions nvim/lua/config/option.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ vim.opt.tabstop = 2
-- Highlight the current line
vim.opt.cursorline = true

-- Show line numbers
-- Line numbers
vim.opt.number = true

-- Disable relative line numbers
-- Relative line numbers
vim.opt.relativenumber = false

-- Set number column width
Expand Down
21 changes: 13 additions & 8 deletions nvim/lua/plugins/formatting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
require("conform").setup({
notify_on_error = false,
format_on_save = {
timeout_ms = 4000,
timeout_ms = 20000,
lsp_fallback = true,
},

Expand All @@ -23,11 +23,7 @@ return {
javascript = { "prettier" },
css = { "stylelint" },
yaml = { "yamlfix" },
sql = {
-- "sql_formatter",
"sqlfluff",
-- "sqlfmt",
},
sql = { "sqlfluff" },
["*"] = {
-- "codespell",
-- "trim_newlines",
Expand All @@ -37,8 +33,17 @@ return {
},
})

require("conform").formatters.sql_formatter = {
command = "sql-formatter --dialect sqlite",
require("conform").formatters.sqlfluff = {
command = "sqlfluff",
inherit = false,
args = {
"fix",
"-t",
"dbt",
"$FILENAME",
},
stdin = false,
require_cwd = true,
}

require("conform").formatters.djlintJinja = {
Expand Down
16 changes: 8 additions & 8 deletions nvim/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ return {
"lua_ls",
"html",
"docker_compose_language_service",
"ruff_lsp",
-- "ruff",
"bashls",
"dockerls",
"jsonls",
"prosemd_lsp",
-- "rnix",
"tsserver",
-- "tsserver",
"emmet_language_server",
"pyright",
"rust_analyzer",
"jedi_language_server",
"sqlls",
-- "sqlls",
},
automatic_installation = true,
})
Expand Down Expand Up @@ -227,11 +227,11 @@ return {
tailwindcss = {
cmd = { "tailwindcss-language-server", "--stdio" },
},
sqlls = {
root_dir = function(fname)
return vim.loop.cwd()
end,
},
-- sqlls = {
-- root_dir = function(fname)
-- return vim.loop.cwd()
-- end,
-- },
}
for server, config in pairs(servers) do
require("lspconfig")[server].setup(vim.tbl_deep_extend("force", {
Expand Down
50 changes: 49 additions & 1 deletion nvim/lua/plugins/text-editing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ return {
{ "farmergreg/vim-lastplace" },
{ "axelf4/vim-strip-trailing-whitespace" },

{ "folke/zen-mode.nvim" },
{
"folke/zen-mode.nvim",
opts = {
window = {
backdrop = 1.0,
width = 1.0,
height = 1.0,
},
plugins = {
options = {
laststatus = 0,
},
},
},
},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},
},
{
"mbbill/undotree",
config = function()
Expand Down Expand Up @@ -106,10 +125,39 @@ return {
},
{
"iamcco/markdown-preview.nvim",
enable=false,
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function()
vim.fn["mkdp#util#install"]()
end,
},
{
"PedramNavid/dbtpal",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
ft = {
"sql",
"md",
"yaml",
},
keys = {
{ "<leader>drf", "<cmd>DbtRun<cr>" },
{ "<leader>drp", "<cmd>DbtRunAll<cr>" },
{ "<leader>dtf", "<cmd>DbtTest<cr>" },
{ "<leader>dm", "<cmd>lua require('dbtpal.telescope').dbt_picker()<cr>" },
},
config = function()
require("dbtpal").setup({
path_to_dbt = "dbt",
path_to_dbt_project = "",
path_to_dbt_profiles_dir = "",
extended_path_search = true,
protect_compiled_files = true,
})
require("telescope").load_extension("dbtpal")
end,
},
}
5 changes: 5 additions & 0 deletions nvim/snippets/python.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ snippet "
$0
"""

snippet block
"""
$0
"""

snippet !
#!/usr/bin/env python3

Expand Down
Loading

0 comments on commit 5ec7503

Please sign in to comment.