mirror of
https://codeberg.org/Mo8it/dotfiles.git
synced 2024-12-04 23:40:32 +00:00
Compare commits
14 commits
0a98551034
...
960dc447fa
Author | SHA1 | Date | |
---|---|---|---|
960dc447fa | |||
92261c49fc | |||
b3c7ca2e81 | |||
9fc5d471c7 | |||
4b9c38b1f1 | |||
b5a171a816 | |||
1ef1937284 | |||
3af5649cab | |||
20925f6a70 | |||
bd1585c010 | |||
37d394c30a | |||
4290b3d4af | |||
b06533b3d2 | |||
f20f0e81c7 |
40 changed files with 200 additions and 702 deletions
|
@ -1,4 +0,0 @@
|
|||
auto_sync = false
|
||||
sync_address = ""
|
||||
|
||||
search_mode = "fuzzy"
|
14
.config/dprint.json
Normal file
14
.config/dprint.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"json": {
|
||||
},
|
||||
"markdown": {
|
||||
},
|
||||
"includes": ["**/*.{json,md}"],
|
||||
"excludes": [
|
||||
"**/*-lock.json"
|
||||
],
|
||||
"plugins": [
|
||||
"https://plugins.dprint.dev/json-0.16.0.wasm",
|
||||
"https://plugins.dprint.dev/markdown-0.14.1.wasm"
|
||||
]
|
||||
}
|
51
.config/helix/config.toml
Normal file
51
.config/helix/config.toml
Normal file
|
@ -0,0 +1,51 @@
|
|||
theme = "onedark"
|
||||
|
||||
[editor]
|
||||
mouse = false
|
||||
shell = ["fish", "-c"]
|
||||
cursorline = true
|
||||
true-color = true
|
||||
bufferline = "multiple"
|
||||
color-modes = true
|
||||
|
||||
[editor.lsp]
|
||||
display-messages = true
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[editor.whitespace.render]
|
||||
space = "none"
|
||||
tab = "none"
|
||||
newline = "all"
|
||||
|
||||
[editor.indent-guides]
|
||||
render = true
|
||||
|
||||
[keys.normal]
|
||||
p = "paste_clipboard_after"
|
||||
P = "paste_clipboard_before"
|
||||
y = "yank_joined_to_clipboard"
|
||||
D = ["yank_main_selection_to_clipboard", "delete_selection"]
|
||||
C-d = ["extend_to_line_bounds", "delete_selection"]
|
||||
V = "extend_to_line_end"
|
||||
|
||||
C-k = "goto_next_buffer"
|
||||
C-j = "goto_previous_buffer"
|
||||
C-b = ":buffer-close"
|
||||
|
||||
esc = ["collapse_selection", "keep_primary_selection"]
|
||||
|
||||
[keys.insert]
|
||||
esc = ["collapse_selection", "normal_mode"]
|
||||
|
||||
[keys.select]
|
||||
p = "replace_selections_with_clipboard"
|
||||
P = "no_op"
|
||||
y = "yank_joined_to_clipboard"
|
||||
D = ["yank_main_selection_to_clipboard", "delete_selection"]
|
||||
V = "extend_to_line_end"
|
||||
|
||||
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
|
29
.config/helix/languages.toml
Normal file
29
.config/helix/languages.toml
Normal file
|
@ -0,0 +1,29 @@
|
|||
[[language]]
|
||||
name = "python"
|
||||
roots = ["pyproject.toml"]
|
||||
formatter = { command = "black", args = ["-q", "-"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "bash"
|
||||
formatter = { command = "beautysh", args=["-"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "markdown"
|
||||
formatter = { command = "dprint", args = ["fmt", "-c", "/home/mo/.config/dprint.json", "--stdin", "md" ] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "json"
|
||||
formatter = { command = "dprint", args = ["fmt", "-c", "/home/mo/.config/dprint.json", "--stdin", "json"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "html"
|
||||
formatter = { command = "djlint", args = ["--reformat", "--quiet", "--preserve-blank-lines", "--format-css", "--format-js", "-"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "julia"
|
||||
auto-format = true
|
|
@ -14,8 +14,7 @@ git:
|
|||
# pager: delta --dark --paging=never
|
||||
|
||||
os:
|
||||
editCommand: "nvim"
|
||||
editCommandTemplate: "{{editor}} +{{line}} -- {{filename}}"
|
||||
editCommand: "hx"
|
||||
|
||||
refresher:
|
||||
refreshInterval: 1
|
||||
|
|
60
.config/nushell/config.nu
Normal file
60
.config/nushell/config.nu
Normal file
|
@ -0,0 +1,60 @@
|
|||
let-env config = {
|
||||
cd_with_abbreviations: false
|
||||
show_banner: false
|
||||
}
|
||||
|
||||
# Setup
|
||||
## Starship
|
||||
source ~/.nu/starship/init.nu
|
||||
## Zoxide
|
||||
source ~/.nu/zoxide.nu
|
||||
|
||||
# Aliases
|
||||
## Safety options
|
||||
alias rm = trash
|
||||
alias cp = cp -i
|
||||
alias mv = mv -i
|
||||
|
||||
## Default options
|
||||
alias rsync = rsync -avhL --partial --zc=zstd --zl=8 --no-i-r --info=progress2
|
||||
alias onefetch = onefetch --no-color-palette
|
||||
|
||||
## Podman
|
||||
alias sage = podman run --pull newer -it --rm docker.io/sagemath/sagemath:latest
|
||||
alias sage-jupyter = podman run --pull newer -it --rm -p8888:8888 docker.io/sagemath/sagemath:latest sage-jupyter
|
||||
|
||||
alias fedora = podman run --pull newer -it --rm registry.fedoraproject.org/fedora:(rpm -E %fedora)
|
||||
|
||||
alias adoc = podman run --pull newer -it --rm -v (pwd):/documents/:Z docker.io/asciidoctor/docker-asciidoctor:latest
|
||||
|
||||
alias pps = podman ps --format '{{.Names}}'
|
||||
|
||||
## Replacements
|
||||
alias cd = z
|
||||
alias cat = bat
|
||||
alias lg = lazygit
|
||||
alias zola = flatpak run org.getzola.zola
|
||||
|
||||
# Functions
|
||||
def tal [project: string, ...args: string] {
|
||||
task add $"project:($project)" priority:L $args
|
||||
}
|
||||
|
||||
def tam [project: string, ...args: string] {
|
||||
task add $"project:($project)" priority:M $args
|
||||
}
|
||||
|
||||
def tah [project: string, ...args: string] {
|
||||
task add $"project:($project)" priority:H $args
|
||||
}
|
||||
|
||||
def vp [project: string] {
|
||||
vit $"project:($project)"
|
||||
}
|
||||
|
||||
def julia [...args: string] {
|
||||
JULIA_NUM_THREADS=16 LD_PRELOAD=/usr/lib64/libstdc++.so.6 ~/.julia/juliaup/bin/julia
|
||||
}
|
||||
|
||||
# Private config
|
||||
source ~/.config/nushell/private_config.nu
|
6
.config/nushell/env.nu
Normal file
6
.config/nushell/env.nu
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Zoxide
|
||||
zoxide init nushell | save ~/.nu/zoxide.nu
|
||||
|
||||
# Starship
|
||||
# TODO: Remove str replace after starship update
|
||||
starship init nu | str replace --string "term size -c" "term size" | save ~/.nu/starship/init.nu
|
|
@ -1 +0,0 @@
|
|||
text.lua
|
|
@ -1 +0,0 @@
|
|||
vim.bo.expandtab = false
|
|
@ -1 +0,0 @@
|
|||
text.lua
|
|
@ -1,13 +0,0 @@
|
|||
local set = vim.keymap.set
|
||||
|
||||
-- Soft wrap
|
||||
vim.wo.wrap = true
|
||||
|
||||
-- Navigation with soft wrap
|
||||
local opts = {
|
||||
buffer = true,
|
||||
silent = true,
|
||||
expr = true,
|
||||
}
|
||||
set("n", "j", "v:count == 0 ? 'gj' : 'j'", opts)
|
||||
set("n", "k", "v:count == 0 ? 'gk' : 'k'", opts)
|
|
@ -1,19 +0,0 @@
|
|||
require("options")
|
||||
require("autocmd")
|
||||
require("plugins")
|
||||
|
||||
--
|
||||
|
||||
-- Load all plugin configurations
|
||||
local f = io.popen("fd --base-directory ~/.config/nvim/lua/plugins -t f --exact-depth 1 -x echo {/.}")
|
||||
local plugin_names = f:lines()
|
||||
|
||||
for plugin_name in plugin_names do
|
||||
require("plugins." .. plugin_name)
|
||||
end
|
||||
|
||||
f:close()
|
||||
|
||||
--
|
||||
|
||||
require("keybindings")
|
|
@ -1,7 +0,0 @@
|
|||
-- Highlight on yank
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ timeout = 1200 })
|
||||
end,
|
||||
})
|
|
@ -1,46 +0,0 @@
|
|||
local set = vim.keymap.set
|
||||
local opts = {
|
||||
silent = true,
|
||||
}
|
||||
|
||||
-- cmd string
|
||||
local function cmd(command)
|
||||
return "<cmd>" .. command .. "<CR>"
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
set("", "<Space>", "<Nop>", opts)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
--
|
||||
|
||||
set("n", "<space>l", cmd("noh"), opts)
|
||||
|
||||
set("v", ">", ">gv", opts)
|
||||
set("v", "<", "<gv", opts)
|
||||
|
||||
set("n", "<C-d>", cmd("bd"), opts)
|
||||
|
||||
--
|
||||
|
||||
set("n", "<C-k>", cmd("BufferLineCycleNext"), opts)
|
||||
set("n", "<C-j>", cmd("BufferLineCyclePrev"), opts)
|
||||
|
||||
set("n", "<C-b>", cmd("NvimTreeToggle"), opts)
|
||||
|
||||
-- Telescope
|
||||
local telescope_custom = require("plugins.telescope")
|
||||
local telescope_builtin = require("telescope.builtin")
|
||||
set("n", "<C-p>", telescope_custom.custom_find_files, opts)
|
||||
set("n", "<C-h>", telescope_custom.custom_find_hidden_files, opts)
|
||||
set("n", "<C-f>", telescope_builtin.current_buffer_fuzzy_find, opts)
|
||||
set("n", "<space>f", telescope_builtin.live_grep, opts)
|
||||
set("n", "<space>s", telescope_builtin.lsp_document_symbols, opts)
|
||||
set("n", "<space>d", telescope_builtin.lsp_definitions, opts)
|
||||
set("n", "<space>r", telescope_builtin.lsp_references, opts)
|
||||
set("n", "<space>b", telescope_builtin.resume, opts)
|
||||
|
||||
-- LSP
|
||||
set("n", "<space>h", vim.lsp.buf.hover, opts)
|
|
@ -1,61 +0,0 @@
|
|||
local o = vim.o
|
||||
|
||||
--
|
||||
|
||||
o.mouse = ""
|
||||
|
||||
o.expandtab = true
|
||||
o.tabstop = 4
|
||||
o.shiftwidth = 4
|
||||
o.smartindent = true
|
||||
|
||||
o.number = true
|
||||
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
|
||||
o.gdefault = true
|
||||
|
||||
o.termguicolors = true
|
||||
|
||||
o.wrap = false
|
||||
|
||||
o.whichwrap = "b,s,h,l,<,>,[,]"
|
||||
|
||||
o.clipboard = "unnamedplus"
|
||||
|
||||
o.undofile = true
|
||||
|
||||
o.showmode = false
|
||||
|
||||
o.scrolloff = 3
|
||||
o.sidescrolloff = 5
|
||||
|
||||
o.cursorline = true
|
||||
|
||||
o.shell = "/usr/bin/fish"
|
||||
|
||||
o.confirm = true
|
||||
|
||||
o.linebreak = true
|
||||
|
||||
o.laststatus = 3
|
||||
|
||||
o.cmdheight = 0
|
||||
|
||||
o.pumblend = 10
|
||||
|
||||
--
|
||||
|
||||
o.shortmess = o.shortmess .. "S"
|
||||
|
||||
--
|
||||
|
||||
-- set ft of .jinja.html files to htmldjango
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".+.jinja.html"] = "htmldjango",
|
||||
[".+.tera.html"] = "htmldjango",
|
||||
[".+.askama.html"] = "htmldjango",
|
||||
},
|
||||
})
|
|
@ -1,155 +0,0 @@
|
|||
return require("packer").startup({
|
||||
function(use)
|
||||
-- Plugin manager
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
-- Themes
|
||||
use("olimorris/onedarkpro.nvim")
|
||||
|
||||
-- Gitsigns
|
||||
use({
|
||||
"lewis6991/gitsigns.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
})
|
||||
|
||||
-- Telescope
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
})
|
||||
--
|
||||
use({
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
run = "make",
|
||||
})
|
||||
|
||||
-- File tree
|
||||
use({
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
requires = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
},
|
||||
})
|
||||
|
||||
-- Status line
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
},
|
||||
})
|
||||
|
||||
-- Buffer line
|
||||
use({
|
||||
"akinsho/bufferline.nvim",
|
||||
requires = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
},
|
||||
})
|
||||
|
||||
-- Show indentation
|
||||
use("lukas-reineke/indent-blankline.nvim")
|
||||
|
||||
-- Comment
|
||||
use({
|
||||
"numToStr/Comment.nvim",
|
||||
})
|
||||
|
||||
-- Todo-comment
|
||||
use({
|
||||
"folke/todo-comments.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
})
|
||||
|
||||
-- Treesitter
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = ":TSUpdate",
|
||||
})
|
||||
-- Rainbow parentheses
|
||||
use({
|
||||
"p00f/nvim-ts-rainbow",
|
||||
requires = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
})
|
||||
-- Autopair
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
requires = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
})
|
||||
-- Autotag
|
||||
use({
|
||||
"windwp/nvim-ts-autotag",
|
||||
requires = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
})
|
||||
|
||||
-- Navic
|
||||
use({
|
||||
"SmiteshP/nvim-navic",
|
||||
requires = {
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
})
|
||||
|
||||
-- Cutlass
|
||||
use("gbprod/cutlass.nvim")
|
||||
|
||||
-- Notifications
|
||||
use("rcarriga/nvim-notify")
|
||||
|
||||
use({
|
||||
"saecki/crates.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
})
|
||||
|
||||
-- null-ls
|
||||
use({
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
})
|
||||
|
||||
-- LSP config
|
||||
use("neovim/nvim-lspconfig")
|
||||
-- Signature
|
||||
use("ray-x/lsp_signature.nvim")
|
||||
|
||||
-- Autocompletion
|
||||
use("hrsh7th/nvim-cmp")
|
||||
-- Sources
|
||||
-- LSP
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
-- Snippets
|
||||
use("L3MON4D3/LuaSnip")
|
||||
use("saadparwaiz1/cmp_luasnip")
|
||||
-- Buffer
|
||||
use("hrsh7th/cmp-buffer")
|
||||
-- Path
|
||||
use("hrsh7th/cmp-path")
|
||||
-- cmdline
|
||||
use("hrsh7th/cmp-cmdline")
|
||||
end,
|
||||
config = {
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({
|
||||
border = "single",
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
|
@ -1,10 +0,0 @@
|
|||
local npairs = require("nvim-autopairs")
|
||||
|
||||
npairs.setup({
|
||||
check_ts = true,
|
||||
})
|
||||
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
@ -1,7 +0,0 @@
|
|||
require("bufferline").setup({
|
||||
options = {
|
||||
show_buffer_close_icons = false,
|
||||
show_close_icon = false,
|
||||
diagnostics = false,
|
||||
},
|
||||
})
|
|
@ -1 +0,0 @@
|
|||
require("Comment").setup()
|
|
@ -1,3 +0,0 @@
|
|||
require("cutlass").setup({
|
||||
cut_key = "m",
|
||||
})
|
|
@ -1,3 +0,0 @@
|
|||
require("gitsigns").setup({
|
||||
numhl = true,
|
||||
})
|
|
@ -1 +0,0 @@
|
|||
require("indent_blankline").setup()
|
|
@ -1,166 +0,0 @@
|
|||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
||||
local formatting_augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local function format_on_save(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({
|
||||
group = formatting_augroup,
|
||||
buffer = bufnr,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = formatting_augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr, timeout_ms = 60000 })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local lsp_signature = require("lsp_signature")
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
local function on_attach_without_formatting(client, bufnr)
|
||||
lsp_signature_config = {
|
||||
bind = true,
|
||||
doc_lines = 0,
|
||||
hint_prefix = "💡 ",
|
||||
handler_opts = {
|
||||
border = "single",
|
||||
},
|
||||
transparency = 10,
|
||||
}
|
||||
lsp_signature.on_attach(lsp_signature_config)
|
||||
|
||||
navic.attach(client, bufnr)
|
||||
end
|
||||
|
||||
local function on_attach_with_formatting(client, bufnr)
|
||||
on_attach_without_formatting(client, bufnr)
|
||||
format_on_save(client, bufnr)
|
||||
end
|
||||
|
||||
lspconfig.pylsp.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach_without_formatting,
|
||||
})
|
||||
|
||||
lspconfig.julials.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach_with_formatting,
|
||||
})
|
||||
|
||||
lspconfig.clangd.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach_with_formatting,
|
||||
})
|
||||
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach_with_formatting,
|
||||
})
|
||||
|
||||
-- null-ls
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.diagnostics.fish,
|
||||
null_ls.builtins.formatting.beautysh,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.djhtml,
|
||||
null_ls.builtins.formatting.fish_indent,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.dprint.with({
|
||||
filetypes = {
|
||||
"markdown",
|
||||
},
|
||||
}),
|
||||
null_ls.builtins.formatting.nginx_beautifier,
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
disabled_filetypes = { "markdown" },
|
||||
}),
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.taplo,
|
||||
},
|
||||
on_attach = format_on_save,
|
||||
})
|
||||
|
||||
require("crates").setup({
|
||||
null_ls = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- luasnip setup
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
-- nvim-cmp setup
|
||||
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
vim.opt.completeopt = "menuone,noselect,preview"
|
||||
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "c", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "c", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
{ name = "crates" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Use buffer source for "/"
|
||||
cmp.setup.cmdline("/", {
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ":"
|
||||
cmp.setup.cmdline(":", {
|
||||
sources = {
|
||||
{ name = "cmdline" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
|
@ -1,24 +0,0 @@
|
|||
local function search_count()
|
||||
if vim.api.nvim_get_vvar("hlsearch") == 1 then
|
||||
local res = vim.fn.searchcount({ maxcount = 999, timeout = 500 })
|
||||
|
||||
if res.total > 0 then
|
||||
return string.format("%d/%d", res.current, res.total)
|
||||
end
|
||||
end
|
||||
|
||||
return ""
|
||||
end
|
||||
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
require("lualine").setup({
|
||||
sections = {
|
||||
lualine_a = { "filename" },
|
||||
lualine_b = { { search_count, type = "lua_expr" } },
|
||||
lualine_c = { { navic.get_location, cond = navic.is_available } },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "filetype" },
|
||||
},
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
local notify = require("notify")
|
||||
|
||||
notify.setup({
|
||||
background_colour = "#1e1e1e",
|
||||
})
|
||||
|
||||
vim.notify = notify
|
|
@ -1,23 +0,0 @@
|
|||
require("nvim-tree").setup({
|
||||
view = {
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = "d", action = "trash" },
|
||||
},
|
||||
},
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = true,
|
||||
},
|
||||
},
|
||||
trash = {
|
||||
require_confirm = false,
|
||||
},
|
||||
filesystem_watchers = {
|
||||
enable = true,
|
||||
},
|
||||
git = {
|
||||
ignore = false,
|
||||
},
|
||||
})
|
|
@ -1,20 +0,0 @@
|
|||
local onedarkpro = require("onedarkpro")
|
||||
|
||||
onedarkpro.setup({
|
||||
theme = "onedark",
|
||||
colors = {
|
||||
onedark = {
|
||||
bg = "#1e1e1e",
|
||||
color_column = "#1b1b1b", -- For unfocused
|
||||
},
|
||||
},
|
||||
options = {
|
||||
bold = true,
|
||||
underline = true,
|
||||
undercurl = true,
|
||||
cursorline = true,
|
||||
window_unfocused_color = true,
|
||||
},
|
||||
})
|
||||
|
||||
onedarkpro.load()
|
|
@ -1,42 +0,0 @@
|
|||
require("telescope").setup({
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
"%.svg",
|
||||
"%.ardour",
|
||||
"%.bak",
|
||||
"%.jpg",
|
||||
"%.png",
|
||||
"%.gif",
|
||||
"%.wav",
|
||||
"%.blend",
|
||||
},
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
-- Addition
|
||||
"--follow",
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("fzf")
|
||||
|
||||
local M = {}
|
||||
|
||||
local find_files = require("telescope.builtin").find_files
|
||||
|
||||
M.custom_find_files = function()
|
||||
local opts = { follow = true }
|
||||
return find_files(opts)
|
||||
end
|
||||
|
||||
M.custom_find_hidden_files = function()
|
||||
local opts = { follow = true, hidden = true, no_ignore = true }
|
||||
return find_files(opts)
|
||||
end
|
||||
|
||||
return M
|
|
@ -1 +0,0 @@
|
|||
require("todo-comments").setup()
|
|
@ -1,39 +0,0 @@
|
|||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"cpp",
|
||||
"css",
|
||||
"fish",
|
||||
"gdscript",
|
||||
"go",
|
||||
"gomod",
|
||||
"html",
|
||||
"json",
|
||||
"julia",
|
||||
"latex",
|
||||
"lua",
|
||||
"python",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"toml",
|
||||
"yaml",
|
||||
-- "markdown",
|
||||
-- "markdown_inline",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
filetypes = { "html", "htmldjango" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Temporary workaround for autotag in htmldjango until a parser exists
|
||||
require("nvim-treesitter.parsers").filetype_to_parsername.htmldjango = "html"
|
|
@ -1,11 +1,10 @@
|
|||
pane_frames false
|
||||
default_layout "compact"
|
||||
|
||||
scroll_buffer_size 100000
|
||||
|
||||
copy_on_select true
|
||||
|
||||
default_shell "/usr/bin/fish"
|
||||
default_shell "/home/mo/.cargo/bin/nu"
|
||||
scrollback_editor "/home/mo/bin/nvim/bin/nvim"
|
||||
|
||||
keybinds clear-defaults=true {
|
||||
|
|
|
@ -10,26 +10,26 @@ layout {
|
|||
|
||||
tab name="lazygit" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "lazygit"
|
||||
command "nu"
|
||||
args "-e" "lazygit"
|
||||
}
|
||||
}
|
||||
tab name="nvim" focus=true {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "nvim"
|
||||
command "nu"
|
||||
args "-e" "nvim"
|
||||
}
|
||||
}
|
||||
tab name="run" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "poetry run ./run.py"
|
||||
command "nu"
|
||||
args "-e" "poetry run ./run.py"
|
||||
}
|
||||
}
|
||||
tab name="tasks" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "nohup xdg-open http://localhost:5000 &> /dev/null; vp advlabdb"
|
||||
command "nu"
|
||||
args "-e" "nohup xdg-open http://localhost:5000 &> /dev/null; vp advlabdb"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,27 +10,27 @@ layout {
|
|||
|
||||
tab name="lazygit" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "lazygit"
|
||||
command "nu"
|
||||
args "-e" "lazygit"
|
||||
}
|
||||
}
|
||||
tab name="nvim" focus=true {
|
||||
pane {
|
||||
cwd "src"
|
||||
command "fish"
|
||||
args "-C" "nvim"
|
||||
command "nu"
|
||||
args "-e" "nvim"
|
||||
}
|
||||
}
|
||||
tab name="mdbook" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "mdbook serve"
|
||||
command "nu"
|
||||
args "-e" "mdbook serve"
|
||||
}
|
||||
}
|
||||
tab name="test" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "sleep 1 && nohup xdg-open http://localhost:3000 &> /dev/null"
|
||||
command "nu"
|
||||
args "-e" "sleep 1 && nohup xdg-open http://localhost:3000 &> /dev/null"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ layout {
|
|||
|
||||
tab name="jupyterlab" focus=true {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "./container.fish"
|
||||
command "nu"
|
||||
args "-e" "./container.nu"
|
||||
}
|
||||
}
|
||||
tab name="shell" {
|
||||
|
|
|
@ -10,20 +10,20 @@ layout {
|
|||
|
||||
tab name="lazygit" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "lazygit"
|
||||
command "nu"
|
||||
args "-e" "lazygit"
|
||||
}
|
||||
}
|
||||
tab name="nvim" focus=true {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "nvim"
|
||||
command "nu"
|
||||
args "-e" "nvim"
|
||||
}
|
||||
}
|
||||
tab name="run" {
|
||||
pane {
|
||||
command "fish"
|
||||
args "-C" "julia scripts/update.jl"
|
||||
command "nu"
|
||||
args "-e" "julia scripts/update.jl"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
layout {
|
||||
pane {
|
||||
command "fish"
|
||||
command "nu"
|
||||
args "-c" "~/.scripts/update.py rpm-ostree"
|
||||
}
|
||||
pane focus=true {
|
||||
command "fish"
|
||||
command "nu"
|
||||
args "-c" "~/.scripts/update.py flatpak"
|
||||
}
|
||||
pane {
|
||||
command "fish"
|
||||
command "nu"
|
||||
args "-c" "~/.scripts/update.py cargo"
|
||||
}
|
||||
pane {
|
||||
cwd "/home/mo/servers/ansible"
|
||||
command "fish"
|
||||
command "nu"
|
||||
args "-c" "ansible-playbook playbooks/update.yml; read -P Enter"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
ENV["JULIA_SHELL"] = "/usr/bin/fish"
|
||||
ENV["JULIA_EDITOR"] = "nvim"
|
||||
ENV["JULIA_SHELL"] = "/usr/bin/bash"
|
||||
ENV["JULIA_EDITOR"] = "/usr/bin/vi"
|
||||
|
||||
using Pkg: Pkg
|
||||
Pkg.update()
|
||||
|
||||
project_path = Pkg.project().path
|
||||
project_dir = split(project_path, "/")[end-1]
|
||||
using OhMyREPL: OhMyREPL
|
||||
using BenchmarkTools: @btime, @benchmark
|
||||
using Revise: Revise, includet
|
||||
|
||||
if !(project_dir in ("nvim-lspconfig",))
|
||||
using OhMyREPL: OhMyREPL
|
||||
using BenchmarkTools: @btime, @benchmark
|
||||
using Revise: Revise, includet
|
||||
|
||||
if isfile("Project.toml")
|
||||
Pkg.activate(".")
|
||||
end
|
||||
if isfile("Project.toml")
|
||||
Pkg.activate(".")
|
||||
end
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[deps]
|
||||
LanguageServer = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7"
|
|
@ -1,4 +1,6 @@
|
|||
[deps]
|
||||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
|
||||
LanguageServer = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7"
|
||||
OhMyREPL = "5fb14364-9ced-5910-84b2-373655c76a03"
|
||||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
|
||||
|
|
|
@ -124,7 +124,7 @@ def main():
|
|||
|
||||
cargo_packages(output_dir)
|
||||
|
||||
npm_packages(output_dir)
|
||||
# npm_packages(output_dir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in a new issue