mirror of https://github.com/sgoudham/dotfiles.git
refactor!: we nix now
parent
b5dfe65152
commit
ea4de175b3
@ -1,21 +0,0 @@
|
|||||||
# vim:ft=yaml:fenc=utf-8:fdm=marker
|
|
||||||
encryption: gpg
|
|
||||||
|
|
||||||
gpg:
|
|
||||||
recipient: sgoudham@gmail.com
|
|
||||||
|
|
||||||
edit:
|
|
||||||
command: lvim
|
|
||||||
diff:
|
|
||||||
command: lvim
|
|
||||||
args:
|
|
||||||
- "-d"
|
|
||||||
- "{{`{{ .Destination }}`}}"
|
|
||||||
- "{{`{{ .Target }}`}}"
|
|
||||||
merge:
|
|
||||||
command: nvim
|
|
||||||
args:
|
|
||||||
- "-d"
|
|
||||||
- "{{`{{ .Destination }}`}}"
|
|
||||||
- "{{`{{ .Source }}"
|
|
||||||
- "{{ .Target }}`}}"
|
|
@ -1,6 +0,0 @@
|
|||||||
README.md
|
|
||||||
|
|
||||||
{{- if eq .chezmoi.os "windows" }}
|
|
||||||
.zshrc
|
|
||||||
.config/
|
|
||||||
{{- end }}
|
|
@ -1,2 +1,5 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
My blazingly fast, memory safe, and borrow-checked dotfiles
|
|
||||||
|
My blazingly reproducible, declarative, and reliable dotfiles
|
||||||
|
|
||||||
|
![](https://i.redd.it/4nriibmskn771.png)
|
@ -1 +0,0 @@
|
|||||||
reload("hammy")
|
|
@ -1,8 +0,0 @@
|
|||||||
local formatters = require("lvim.lsp.null-ls.formatters")
|
|
||||||
|
|
||||||
formatters.setup({
|
|
||||||
{
|
|
||||||
command = "stylua",
|
|
||||||
filetypes = { "lua" },
|
|
||||||
},
|
|
||||||
})
|
|
@ -1,21 +0,0 @@
|
|||||||
reload("hammy.set")
|
|
||||||
reload("hammy.remap")
|
|
||||||
reload("hammy.formatter")
|
|
||||||
-- reload("hammy.linter")
|
|
||||||
reload("hammy.packer")
|
|
||||||
reload("hammy.lsp")
|
|
||||||
reload("hammy.plugin")
|
|
||||||
|
|
||||||
-- Some "Proper" Custom Configuration --
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
|
||||||
group = vim.api.nvim_create_augroup("editorconfig", { clear = true }),
|
|
||||||
pattern = "*.editorconfig",
|
|
||||||
desc = "Refresh open buffers configuration on .editorconfig save",
|
|
||||||
callback = function()
|
|
||||||
for _, buf in pairs(vim.api.nvim_list_bufs()) do
|
|
||||||
if vim.api.nvim_buf_is_valid(buf) then
|
|
||||||
require("editorconfig").config(buf)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
@ -1,18 +0,0 @@
|
|||||||
-- -- set additional linters
|
|
||||||
-- local linters = require "lvim.lsp.null-ls.linters"
|
|
||||||
-- linters.setup {
|
|
||||||
-- { command = "flake8", filetypes = { "python" } },
|
|
||||||
-- {
|
|
||||||
-- -- each linter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
|
|
||||||
-- command = "shellcheck",
|
|
||||||
-- ---@usage arguments to pass to the formatter
|
|
||||||
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
|
|
||||||
-- extra_args = { "--severity", "warning" },
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- command = "codespell",
|
|
||||||
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
|
|
||||||
-- filetypes = { "javascript", "python" },
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
local opts = {
|
|
||||||
cmd = { "haskell-language-server-9.2.4", "--lsp" },
|
|
||||||
}
|
|
||||||
|
|
||||||
require("lvim.lsp.manager").setup("hls", opts)
|
|
@ -1,60 +0,0 @@
|
|||||||
reload("hammy.lsp.haskell")
|
|
||||||
reload("hammy.lsp.rust")
|
|
||||||
|
|
||||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
|
||||||
|
|
||||||
local lsp_diagnostics = {
|
|
||||||
update_in_insert = true,
|
|
||||||
float = { border = "rounded" },
|
|
||||||
}
|
|
||||||
local buffer_mappings = {
|
|
||||||
normal_mode = {
|
|
||||||
["ge"] = {
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").diagnostics()
|
|
||||||
end,
|
|
||||||
"Display Workplace Diagnostics",
|
|
||||||
},
|
|
||||||
["gr"] = {
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_references()
|
|
||||||
end,
|
|
||||||
"Goto References",
|
|
||||||
},
|
|
||||||
["gd"] = {
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_definitions()
|
|
||||||
end,
|
|
||||||
"Goto Definitions",
|
|
||||||
},
|
|
||||||
["gI"] = {
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_implementations()
|
|
||||||
end,
|
|
||||||
"Goto Implementations",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
lvim.lsp.diagnostics = vim.tbl_deep_extend("keep", lsp_diagnostics, lvim.lsp.diagnostics)
|
|
||||||
lvim.lsp.buffer_mappings = vim.tbl_deep_extend("keep", buffer_mappings, lvim.lsp.buffer_mappings)
|
|
||||||
|
|
||||||
-- Requires `:LvimCacheReset` to take effect
|
|
||||||
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "hls", "rust_analyzer" })
|
|
||||||
|
|
||||||
-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. !!Requires `:LvimCacheReset` to take effect!!
|
|
||||||
---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
|
|
||||||
-- ---`:LvimInfo` lists which server(s) are skipped for the current filetype
|
|
||||||
-- lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
|
|
||||||
-- return server ~= "hls"
|
|
||||||
-- end, lvim.lsp.automatic_configuration.skipped_servers)
|
|
||||||
|
|
||||||
-- -- you can set a custom on_attach function that will be used for all the language servers
|
|
||||||
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
|
|
||||||
-- lvim.lsp.on_attach_callback = function(client, bufnr)
|
|
||||||
-- local function buf_set_option(...)
|
|
||||||
-- vim.api.nvim_buf_set_option(bufnr, ...)
|
|
||||||
-- end
|
|
||||||
-- --Enable completion triggered by <c-x><c-o>
|
|
||||||
-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
|
||||||
-- end
|
|
@ -1,102 +0,0 @@
|
|||||||
local mason_path = vim.fn.glob(vim.fn.stdpath("data") .. "/mason/")
|
|
||||||
local codelldb_adapter = {
|
|
||||||
type = "server",
|
|
||||||
port = "${port}",
|
|
||||||
executable = {
|
|
||||||
command = mason_path .. "bin/codelldb",
|
|
||||||
args = { "--port", "${port}" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
pcall(function()
|
|
||||||
require("rust-tools").setup({
|
|
||||||
tools = {
|
|
||||||
reload_workspace_from_cargo_toml = true,
|
|
||||||
runnables = {
|
|
||||||
use_telescope = true,
|
|
||||||
},
|
|
||||||
inlay_hints = {
|
|
||||||
auto = true,
|
|
||||||
only_current_line = false,
|
|
||||||
show_parameter_hints = false,
|
|
||||||
parameter_hints_prefix = "<-",
|
|
||||||
other_hints_prefix = "=> ",
|
|
||||||
highlight = "Comment",
|
|
||||||
},
|
|
||||||
hover_actions = {
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
on_initialized = function()
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter", "CursorHold", "InsertLeave" }, {
|
|
||||||
pattern = { "*.rs" },
|
|
||||||
callback = function()
|
|
||||||
local _, _ = pcall(vim.lsp.codelens.refresh)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
dap = {
|
|
||||||
adapter = codelldb_adapter,
|
|
||||||
},
|
|
||||||
server = {
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
require("lvim.lsp").common_on_attach(client, bufnr)
|
|
||||||
local rt = require("rust-tools")
|
|
||||||
vim.keymap.set("n", "K", rt.hover_actions.hover_actions, { buffer = bufnr })
|
|
||||||
end,
|
|
||||||
|
|
||||||
capabilities = require("lvim.lsp").common_capabilities(),
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
lens = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
checkOnSave = {
|
|
||||||
enable = true,
|
|
||||||
command = "clippy",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end)
|
|
||||||
|
|
||||||
lvim.builtin.dap.on_config_done = function(dap)
|
|
||||||
dap.adapters.codelldb = codelldb_adapter
|
|
||||||
dap.configurations.rust = {
|
|
||||||
{
|
|
||||||
name = "Launch file",
|
|
||||||
type = "codelldb",
|
|
||||||
request = "launch",
|
|
||||||
program = function()
|
|
||||||
vim.fn.jobstart("cargo test --no-run")
|
|
||||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/", "file")
|
|
||||||
end,
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
stopOnEntry = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- vim.api.nvim_set_keymap("n", "<m-d>", "<cmd>RustOpenExternalDocs<Cr>", { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- lvim.builtin.which_key.mappings["C"] = {
|
|
||||||
-- name = "Rust",
|
|
||||||
-- r = { "<cmd>RustRunnables<Cr>", "Runnables" },
|
|
||||||
-- t = { "<cmd>lua _CARGO_TEST()<cr>", "Cargo Test" },
|
|
||||||
-- m = { "<cmd>RustExpandMacro<Cr>", "Expand Macro" },
|
|
||||||
-- c = { "<cmd>RustOpenCargo<Cr>", "Open Cargo" },
|
|
||||||
-- p = { "<cmd>RustParentModule<Cr>", "Parent Module" },
|
|
||||||
-- d = { "<cmd>RustDebuggables<Cr>", "Debuggables" },
|
|
||||||
-- v = { "<cmd>RustViewCrateGraph<Cr>", "View Crate Graph" },
|
|
||||||
-- R = {
|
|
||||||
-- "<cmd>lua require('rust-tools/workspace_refresh')._reload_workspace_from_cargo_toml()<Cr>",
|
|
||||||
-- "Reload Workspace",
|
|
||||||
-- },
|
|
||||||
-- o = { "<cmd>RustOpenExternalDocs<Cr>", "Open External Docs" },
|
|
||||||
-- y = { "<cmd>lua require'crates'.open_repository()<cr>", "[crates] open repository" },
|
|
||||||
-- P = { "<cmd>lua require'crates'.show_popup()<cr>", "[crates] show popup" },
|
|
||||||
-- i = { "<cmd>lua require'crates'.show_crate_popup()<cr>", "[crates] show info" },
|
|
||||||
-- f = { "<cmd>lua require'crates'.show_features_popup()<cr>", "[crates] show features" },
|
|
||||||
-- D = { "<cmd>lua require'crates'.show_dependencies_popup()<cr>", "[crates] show dependencies" },
|
|
||||||
-- }
|
|
@ -1,94 +0,0 @@
|
|||||||
lvim.plugins = {
|
|
||||||
{ "andweeb/presence.nvim" },
|
|
||||||
{ "hrsh7th/cmp-cmdline" },
|
|
||||||
{ "gpanders/editorconfig.nvim" },
|
|
||||||
{ "p00f/nvim-ts-rainbow" },
|
|
||||||
{ "nvim-treesitter/playground" },
|
|
||||||
{ "nvim-treesitter/nvim-treesitter-textobjects"},
|
|
||||||
{ "simrat39/rust-tools.nvim" },
|
|
||||||
{
|
|
||||||
"saecki/crates.nvim",
|
|
||||||
tag = "v0.3.0",
|
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("crates").setup({
|
|
||||||
null_ls = {
|
|
||||||
enabled = true,
|
|
||||||
name = "crates.nvim",
|
|
||||||
},
|
|
||||||
popup = {
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"axkirillov/easypick.nvim",
|
|
||||||
config = function()
|
|
||||||
local easypick = require("easypick")
|
|
||||||
easypick.setup({
|
|
||||||
pickers = {
|
|
||||||
{
|
|
||||||
name = "chezmoi",
|
|
||||||
command = [[chezmoi managed -x encrypted -i files | awk '{ printf("%s/%s\n", "~", $0) }']],
|
|
||||||
opts = require("telescope.themes").get_dropdown({}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
config = function()
|
|
||||||
require("dressing").setup({ input = { insert_only = false } })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kylechui/nvim-surround",
|
|
||||||
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
|
|
||||||
config = function()
|
|
||||||
require("nvim-surround").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"catppuccin/nvim",
|
|
||||||
as = "catppuccin",
|
|
||||||
config = function()
|
|
||||||
local cp = require("catppuccin.palettes").get_palette()
|
|
||||||
|
|
||||||
require("catppuccin").setup({
|
|
||||||
flavour = "mocha",
|
|
||||||
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
|
|
||||||
transparent_background = true,
|
|
||||||
term_colors = true,
|
|
||||||
no_italic = true,
|
|
||||||
integrations = {
|
|
||||||
ts_rainbow = true,
|
|
||||||
which_key = true,
|
|
||||||
dap = { enabled = true, enable_ui = true },
|
|
||||||
navic = { enabled = true, custom_bg = "NONE" },
|
|
||||||
},
|
|
||||||
color_overrides = {
|
|
||||||
mocha = {
|
|
||||||
base = "#000000",
|
|
||||||
mantle = "#000000",
|
|
||||||
surface2 = cp.subtext0,
|
|
||||||
overlay0 = cp.subtext0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
custom_highlights = {
|
|
||||||
ErrorMsg = { fg = cp.red, style = { "bold" } },
|
|
||||||
LspInfoBorder = { link = "FloatBorder" },
|
|
||||||
PmenuSel = { bg = cp.surface0 },
|
|
||||||
FloatBorder = { fg = cp.overlay0, bg = "NONE" },
|
|
||||||
TelescopeBorder = { link = "FloatBorder" },
|
|
||||||
TelescopeMatching = { link = "TelescopeNormal" },
|
|
||||||
TelescopeSelection = { fg = "NONE", bg = cp.surface0 },
|
|
||||||
TelescopeTitle = { fg = cp.subtext0 },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_command("colorscheme catppuccin")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
local cmp = require("cmp")
|
|
||||||
local mappings = {
|
|
||||||
["<A-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
|
||||||
["<A-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
|
||||||
["<A-p>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<A-n>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
}
|
|
||||||
|
|
||||||
lvim.builtin.cmp.cmdline.enable = true
|
|
||||||
lvim.builtin.cmp.mapping = vim.tbl_deep_extend("keep", mappings, lvim.builtin.cmp.mapping)
|
|
@ -1,11 +0,0 @@
|
|||||||
lvim.builtin.alpha.active = true
|
|
||||||
lvim.builtin.alpha.mode = "dashboard"
|
|
||||||
|
|
||||||
lvim.builtin.alpha.dashboard.section.header.val = {
|
|
||||||
[[ __ ]],
|
|
||||||
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
|
|
||||||
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
|
|
||||||
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
|
|
||||||
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
|
|
||||||
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
reload("hammy.plugin.cmp")
|
|
||||||
reload("hammy.plugin.treesitter")
|
|
||||||
reload("hammy.plugin.telescope")
|
|
||||||
reload("hammy.plugin.dashboard")
|
|
||||||
reload("hammy.plugin.nvimtree")
|
|
||||||
|
|
||||||
-- Enable/Disable Lvim Plugins
|
|
||||||
lvim.builtin.project.active = true
|
|
||||||
lvim.builtin.bufferline.active = false
|
|
||||||
lvim.builtin.breadcrumbs.active = true
|
|
||||||
lvim.builtin.terminal.active = false
|
|
||||||
lvim.builtin.indentlines.active = false
|
|
||||||
lvim.builtin.illuminate.active = false
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
lvim.builtin.nvimtree.setup.view.side = "left"
|
|
||||||
lvim.builtin.nvimtree.setup.renderer.icons.show.git = true
|
|
@ -1,38 +0,0 @@
|
|||||||
lvim.builtin.telescope.defaults.prompt_prefix = "🔍 "
|
|
||||||
lvim.builtin.telescope.defaults.selection_caret = "> "
|
|
||||||
lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git/" }
|
|
||||||
|
|
||||||
lvim.builtin.which_key.mappings["f"] = {
|
|
||||||
name = "Find",
|
|
||||||
b = { "<cmd>Telescope buffers<CR>", "Open Buffers" },
|
|
||||||
f = { "<cmd>Telescope find_files<CR>", "Find File" },
|
|
||||||
h = { "<cmd>Telescope help_tags<CR>", "Find Help" },
|
|
||||||
H = { "<cmd>Telescope highlights<CR>", "Find Highlights" },
|
|
||||||
g = { "<cmd>Telescope live_grep<CR>", "Find Text" },
|
|
||||||
R = { "<cmd>Telescope registers<CR>", "Find Registers" },
|
|
||||||
k = { "<cmd>Telescope keymaps<CR>", "Find Keymaps" },
|
|
||||||
c = {
|
|
||||||
"<cmd>Telescope current_buffer_fuzzy_find<CR>",
|
|
||||||
"Find Text In Current Buffer",
|
|
||||||
},
|
|
||||||
C = { "<cmd>Telescope commands<CR>", "Find Commands" },
|
|
||||||
r = { "<cmd>Telescope oldfiles<CR>", "Open Recent File" },
|
|
||||||
p = { "<cmd>Telescope projects<CR>", "Open Projects" },
|
|
||||||
d = { "<cmd>Easypick chezmoi<CR>", "Open Dotfiles" },
|
|
||||||
}
|
|
||||||
|
|
||||||
local _, actions = pcall(require, "telescope.actions")
|
|
||||||
lvim.builtin.telescope.defaults.mappings = {
|
|
||||||
i = {
|
|
||||||
["<A-j>"] = actions.move_selection_next,
|
|
||||||
["<A-k>"] = actions.move_selection_previous,
|
|
||||||
["<A-n>"] = actions.cycle_history_next,
|
|
||||||
["<A-p>"] = actions.cycle_history_prev,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
["<A-j>"] = actions.move_selection_next,
|
|
||||||
["<A-k>"] = actions.move_selection_previous,
|
|
||||||
["<A-n>"] = actions.preview_scrolling_down,
|
|
||||||
["<A-p>"] = actions.preview_scrolling_up,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
lvim.builtin.treesitter.rainbow.enable = true
|
|
||||||
lvim.builtin.treesitter.highlight.enable = true
|
|
||||||
lvim.builtin.treesitter.ensure_installed = "all"
|
|
||||||
lvim.builtin.treesitter.textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
["aa"] = "@parameter.outer",
|
|
||||||
["ia"] = "@parameter.inner",
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
|
||||||
goto_next_start = {
|
|
||||||
["]m"] = "@function.outer",
|
|
||||||
["]]"] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_next_end = {
|
|
||||||
["]M"] = "@function.outer",
|
|
||||||
["]["] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_previous_start = {
|
|
||||||
["[m"] = "@function.outer",
|
|
||||||
["[["] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
["[M"] = "@function.outer",
|
|
||||||
["[]"] = "@class.outer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
["<leader>a"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
["<leader>A"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
-- unmapping defaults
|
|
||||||
lvim.keys.normal_mode["<C-j>"] = false
|
|
||||||
lvim.keys.normal_mode["<C-l>"] = false
|
|
||||||
lvim.keys.normal_mode["<C-k>"] = false
|
|
||||||
lvim.keys.insert_mode["<M-j>"] = false
|
|
||||||
lvim.keys.insert_mode["<M-k>"] = false
|
|
||||||
lvim.builtin.which_key.mappings["s"] = nil
|
|
||||||
|
|
||||||
-- navigation
|
|
||||||
lvim.keys.normal_mode["<M-j>"] = "<C-w>j"
|
|
||||||
lvim.keys.normal_mode["<M-k>"] = "<C-w>k"
|
|
||||||
lvim.keys.normal_mode["<M-l>"] = "<C-w>l"
|
|
||||||
lvim.keys.normal_mode["<M-h>"] = "<C-w>h"
|
|
||||||
|
|
||||||
-- useful
|
|
||||||
lvim.keys.normal_mode["<C-u>"] = "<C-u>zz"
|
|
||||||
lvim.keys.normal_mode["<C-d>"] = "<C-d>zz"
|
|
||||||
lvim.keys.normal_mode["J"] = "mzJ`z"
|
|
||||||
lvim.keys.normal_mode["n"] = "nzzzv"
|
|
||||||
lvim.keys.normal_mode["N"] = "Nzzzv"
|
|
||||||
lvim.keys.normal_mode["<CR>"] = "o<ESC>"
|
|
||||||
lvim.keys.normal_mode["0"] = "^"
|
|
||||||
lvim.keys.normal_mode["[d"] = ":lua vim.diagnostic.goto_prev()<CR>"
|
|
||||||
lvim.keys.normal_mode["]d"] = ":lua vim.diagnostic.goto_next()<CR>"
|
|
||||||
lvim.keys.normal_mode["[c"] = ":lua require('gitsigns').prev_hunk()<CR>"
|
|
||||||
lvim.keys.normal_mode["]c"] = ":lua require('gitsigns').next_hunk()<CR>"
|
|
||||||
|
|
||||||
-- clipboard
|
|
||||||
lvim.keys.visual_block_mode["<leader>p"] = [["_dp]]
|
|
||||||
lvim.keys.visual_mode["<leader>y"] = [["+y]]
|
|
||||||
lvim.keys.normal_mode["<leader>y"] = [["+y]]
|
|
||||||
lvim.keys.normal_mode["<leader>Y"] = [["+Y]]
|
|
@ -1,14 +0,0 @@
|
|||||||
vim.opt.timeoutlen = 500
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
vim.opt.laststatus = 3
|
|
||||||
vim.opt.pumheight = 20
|
|
||||||
vim.opt.clipboard = ""
|
|
||||||
vim.opt.lazyredraw = true
|
|
||||||
vim.opt.showtabline = 0
|
|
||||||
vim.opt.completeopt = [[menuone,noinsert,noselect]]
|
|
||||||
|
|
||||||
-- Lvim Related Stuffs
|
|
||||||
lvim.log.level = "warn"
|
|
||||||
lvim.format_on_save = false
|
|
||||||
lvim.colorscheme = "catppuccin"
|
|
||||||
lvim.leader = "space"
|
|
@ -1,12 +0,0 @@
|
|||||||
-- https://sookocheff.com/post/vim/neovim-java-ide/ :bless:
|
|
||||||
|
|
||||||
vim.opt_local.shiftwidth = 4
|
|
||||||
vim.opt_local.tabstop = 4
|
|
||||||
vim.opt_local.softtabstop = 4
|
|
||||||
|
|
||||||
local root_markers = { "gradlew", "mvnw", ".git", "pom.xml", "build.gradle" }
|
|
||||||
local root_dir = require("jdtls.setup").find_root(root_markers)
|
|
||||||
local workspace_folder = os.getenv("HOME") .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
|
|
||||||
|
|
||||||
local config = require("lsp.java").make_jdtls_config(root_dir, workspace_folder)
|
|
||||||
require("jdtls").start_or_attach(config)
|
|
@ -1,97 +0,0 @@
|
|||||||
-- set this early so plugins etc can all use it
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
-- disable netrw at the very start of your init.lua (strongly advised)
|
|
||||||
-- vim.g.loaded_netrw = 0
|
|
||||||
-- vim.g.loaded_netrwPlugin = 0
|
|
||||||
|
|
||||||
-- bootstrap & set up lazy
|
|
||||||
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)
|
|
||||||
|
|
||||||
require("lazy").setup("plugins", {
|
|
||||||
install = {
|
|
||||||
colorscheme = { "catppuccin" },
|
|
||||||
missing = true,
|
|
||||||
},
|
|
||||||
change_detection = {
|
|
||||||
enabled = true,
|
|
||||||
notify = false,
|
|
||||||
},
|
|
||||||
ui = {
|
|
||||||
border = "rounded",
|
|
||||||
icons = {
|
|
||||||
list = { "●" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- load remaining config
|
|
||||||
require("options")
|
|
||||||
require("binds")
|
|
||||||
|
|
||||||
vim.api.nvim_create_augroup("disable_mini", {})
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
|
||||||
group = "disable_mini",
|
|
||||||
pattern = { "NvimTr*" },
|
|
||||||
callback = function()
|
|
||||||
vim.b.miniindentscope_disable = true
|
|
||||||
vim.b.minicursorword_disable = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd({ "User" }, {
|
|
||||||
group = "disable_mini",
|
|
||||||
pattern = "AlphaReady",
|
|
||||||
callback = function()
|
|
||||||
vim.b.miniindentscope_disable = true
|
|
||||||
vim.b.minicursorword_disable = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- highlight yank
|
|
||||||
vim.api.nvim_create_augroup("highlight_yank", {})
|
|
||||||
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
|
||||||
group = "highlight_yank",
|
|
||||||
pattern = { "*" },
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank({
|
|
||||||
higroup = "Visual",
|
|
||||||
timeout = 150,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
-- Disable semantic highlights
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
callback = function(args)
|
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
-- Stop comments on new lines when pressing 'o'
|
|
||||||
vim.api.nvim_create_augroup("stop_comments_on_o", {})
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
|
||||||
group = "stop_comments_on_o",
|
|
||||||
callback = function(_)
|
|
||||||
vim.opt.formatoptions:remove("o")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_augroup("last_loc", {})
|
|
||||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
|
||||||
group = "last_loc",
|
|
||||||
callback = function()
|
|
||||||
local mark = vim.api.nvim_buf_get_mark(0, '"')
|
|
||||||
local lcount = vim.api.nvim_buf_line_count(0)
|
|
||||||
if mark[1] > 0 and mark[1] <= lcount then
|
|
||||||
pcall(vim.api.nvim_win_set_cursor, 0, mark)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
@ -1,71 +0,0 @@
|
|||||||
{
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "58fbfc627a93281a77f7d161d4ff702e639677b1" },
|
|
||||||
"actually.nvim": { "branch": "main", "commit": "a735082694b1f06c4d9874f2a7288dba94acdb71" },
|
|
||||||
"alpha-nvim": { "branch": "main", "commit": "1c903fd40b1d51e7740b4d90e9f18e83f2916586" },
|
|
||||||
"ascii-blocks.nvim": { "branch": "main", "commit": "a8a7d99fc52df30d7c4e7664818542fd44839d97" },
|
|
||||||
"asciitree.nvim": { "branch": "main", "commit": "a979a0c6987e07eaa9f405d90c086105c0a2d99c" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "a5f3ed5d3b1d9ea21183718a8a89a6653bd6ea48" },
|
|
||||||
"ccc.nvim": { "branch": "main", "commit": "be0a8122fd77efb7b6a0d672bab10417e68fab8b" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
|
||||||
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
|
||||||
"delaytrain.nvim": { "branch": "main", "commit": "eb8d2157e6a7de1b4f024f7ca5bccc4014d88b05" },
|
|
||||||
"dressing.nvim": { "branch": "master", "commit": "db716a0f1279f79a886c0e0b6ab3c3d5ffdb42fe" },
|
|
||||||
"feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "1645e7cd98ed99e766c84ab3cf13a1612c77dcee" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "a5caac26768af80b7c57b919f77b3fed3d7424d0" },
|
|
||||||
"go.nvim": { "branch": "master", "commit": "37d226ca7444a3950a133acc205aaba7a2339f69" },
|
|
||||||
"guihua.lua": { "branch": "master", "commit": "d331b1526a87edbe13679298c3547d49f8a14ffc" },
|
|
||||||
"haskell-tools.nvim": { "branch": "1.x.x", "commit": "66e78bb7184a992c25669c46e6b9af39623bb739" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "c778b7aa04c484e1536ba219e71f2fd0f05302aa" },
|
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
|
||||||
"ltex_extra.nvim": { "branch": "master", "commit": "1d2f288ceedc70d5a9c00f55c0d0cc788b5164f2" },
|
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e2b82cf4c68b453eeab5833d90c042ed4b49d0e1" },
|
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "9ad7503c32545ee6e8000e52d9ae4a93d49231fb" },
|
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "28d87f3e91f9a333cc2726eea4922768a67bfc8e" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "bd3b9918dc317b8772000949a0229156dbb004bb" },
|
|
||||||
"mini.nvim": { "branch": "main", "commit": "8a248b3b2cf26bf450299cd715b770668c6b5d2d" },
|
|
||||||
"neodev.nvim": { "branch": "main", "commit": "a81e749d0fe8429cd340b2e40f274b344bef42ac" },
|
|
||||||
"neogit": { "branch": "master", "commit": "089d388876a535032ac6a3f80e19420f09e4ddda" },
|
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "9d811bb6ed44cf766f4bda8a47fd65fdfbdcaa7d" },
|
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "45ae3122a4c7744db41298b41f9f5a3f092123e6" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "aae0c3e4e778ca4be6fabc52e388cbd5b844b7a5" },
|
|
||||||
"nvim-coverage": { "branch": "main", "commit": "5c5ab0cc575c483bf3485b9481880b5ea4160ed4" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "401f5f22b2d7f9bdbb9294d0235136091458816a" },
|
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cb623ef426ca81fc437f946f4556f556f369f74d" },
|
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" },
|
|
||||||
"nvim-jdtls": { "branch": "master", "commit": "8fe3be1c08ab0bb55f2998fbc02f1a08f87a44bc" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" },
|
|
||||||
"nvim-navic": { "branch": "master", "commit": "7e9d2b2b601149fecdccd11b516acb721e571fe6" },
|
|
||||||
"nvim-surround": { "branch": "main", "commit": "90821ad682aac189cd0a38fd83fc96f0cbcc5d29" },
|
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "8b8d457e07d279976a9baac6bbff5aa036afdc5f" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "ad9ae9e7def54fee446c3e186ed0a0d44cca7b90" },
|
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "37e3c7b32b653f24d7aa2fa087a9c5a67ef07786" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "bb6d4fd1e010300510172b173ab5205d37af084f" },
|
|
||||||
"overseer.nvim": { "branch": "master", "commit": "42c0d69f505314d6994a84da4e3fcbaf308c1a86" },
|
|
||||||
"playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
|
|
||||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
|
||||||
"project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" },
|
|
||||||
"py_lsp.nvim": { "branch": "main", "commit": "6f160d0e1864b1a46c932c542a132a57abd7f1c1" },
|
|
||||||
"quick-scope": { "branch": "master", "commit": "428e8698347f254d24b248af9f656194a80081e5" },
|
|
||||||
"rust-tools.nvim": { "branch": "master", "commit": "bd1aa99ffb911a1cf99b3fcf3b44c0391c57e3ef" },
|
|
||||||
"smart-open.nvim": { "branch": "main", "commit": "ebf87075af7d193c16800ce682a04eca393ac2a7" },
|
|
||||||
"sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" },
|
|
||||||
"statuscol.nvim": { "branch": "main", "commit": "49a3bdab3e9cf23982724c1e888a6296fca4c8b9" },
|
|
||||||
"telescope-catppuccin.nvim": { "branch": "main", "commit": "92e028a34d917d5b4b891f8f4406c45c8cc6497e" },
|
|
||||||
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" },
|
|
||||||
"twilight.nvim": { "branch": "main", "commit": "9410252bed96887ca5a86bf16435a3a51a0e6ce5" },
|
|
||||||
"vim-textobj-entire": { "branch": "master", "commit": "64a856c9dff3425ed8a863b9ec0a21dbaee6fb3a" },
|
|
||||||
"vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" },
|
|
||||||
"vimtex": { "branch": "master", "commit": "cb1460f6e6160a855bf83d93d9a34bb944f6b540" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" },
|
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" }
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
-- what a workaround (screw you @nekowinston :sob:)
|
|
||||||
-- https://github.com/wez/wezterm/discussions/2426
|
|
||||||
-- https://github.com/neovim/neovim/issues/2252
|
|
||||||
wk.register({
|
|
||||||
["<A-N>"] = { "<cmd>lua io.popen('wezterm cli split-pane --right --cwd .')<cr>", "All my homies hate OSC 7" },
|
|
||||||
["<A-M>"] = { "<cmd>lua io.popen('wezterm cli split-pane --bottom --cwd .')<cr>", "All my homies hate OSC 7" },
|
|
||||||
}, { mode = { "n", "i", "v", "t" } })
|
|
||||||
|
|
||||||
-- normal binds
|
|
||||||
wk.register({
|
|
||||||
["0"] = { "0^", "Start of Line" },
|
|
||||||
["<CR>"] = { "o<ESC>", "New Line" },
|
|
||||||
["<C-d>"] = { "<C-d>zz", "Half page down" },
|
|
||||||
["<C-u>"] = { "<C-u>zz", "Half page up" },
|
|
||||||
|
|
||||||
n = { "nzzzv", "Next result (centered)" },
|
|
||||||
N = { "Nzzzv", "Previous result (centered)" },
|
|
||||||
J = { "mzJ`z", "Join lines (stable)" },
|
|
||||||
["<leader>li"] = { "<cmd>LspInfo<cr>", "LSP Info" },
|
|
||||||
["<leader>lI"] = { "<cmd>Mason<cr>", "Mason Info" },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- visual binds
|
|
||||||
wk.register({
|
|
||||||
J = { ":m '>+1<CR>gv=gv", "Move line down" },
|
|
||||||
K = { ":m '<-2<CR>gv=gv", "Move line up" },
|
|
||||||
["<"] = { "<gv", "Better Left Indent" },
|
|
||||||
[">"] = { ">gv", "Better Right Indent" }
|
|
||||||
}, { mode = "v" })
|
|
||||||
|
|
||||||
-- terminal binds
|
|
||||||
wk.register({
|
|
||||||
["<A-Esc>"] = { [[<C-\><C-n>]], "Normal mode" },
|
|
||||||
}, { mode = "t" })
|
|
||||||
|
|
||||||
-- normal + terminal binds
|
|
||||||
wk.register({
|
|
||||||
["<A-h>"] = { "<cmd>wincmd h<cr>", "Go to the left window" },
|
|
||||||
["<A-j>"] = { "<cmd>wincmd j<cr>", "Go to the down window" },
|
|
||||||
["<A-k>"] = { "<cmd>wincmd k<cr>", "Go to the up window" },
|
|
||||||
["<A-l>"] = { "<cmd>wincmd l<cr>", "Go to the right window" },
|
|
||||||
}, { mode = { "n", "t" } })
|
|
||||||
|
|
||||||
-- leader binds
|
|
||||||
wk.register({
|
|
||||||
p = { [["+p]], "Put from clipboard" },
|
|
||||||
w = { [[:w<CR>]], "Quick Save" },
|
|
||||||
q = { [[:q<CR>]], "Quick Exit" },
|
|
||||||
Q = { [[:qa<CR>]], "Quick Exit All Buffers" },
|
|
||||||
}, { prefix = "<leader>" })
|
|
||||||
|
|
||||||
-- nv leader binds
|
|
||||||
wk.register({
|
|
||||||
-- d = { [["_d]], "Delete w/o yank" },
|
|
||||||
y = { [["+y]], "Yank to clipboard" },
|
|
||||||
}, { prefix = "<leader>", mode = { "n", "v" } })
|
|
||||||
|
|
||||||
-- x leader binds
|
|
||||||
wk.register({
|
|
||||||
p = { [["_dP"]], "Put w/o yank" },
|
|
||||||
}, { prefix = "<leader>", mode = "x" })
|
|
@ -1,43 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local map = function(mode, lhs, rhs, opts)
|
|
||||||
vim.keymap.set(mode, lhs, rhs, { buffer = opts[1], desc = opts[2] })
|
|
||||||
end
|
|
||||||
M.map = map
|
|
||||||
|
|
||||||
M.default_config = {
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
|
||||||
require("nvim-navic").attach(client, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
map("n", "K", vim.lsp.buf.hover, { bufnr, "Hover Information" })
|
|
||||||
map("n", "]d", vim.diagnostic.goto_next, { bufnr, "Next Diagnostic" })
|
|
||||||
map("n", "[d", vim.diagnostic.goto_prev, { bufnr, "Previous Diagnostic" })
|
|
||||||
|
|
||||||
map("n", "gs", vim.lsp.buf.signature_help, { bufnr, "Signature Help" })
|
|
||||||
map("n", "gD", vim.lsp.buf.declaration, { bufnr, "Declarations" })
|
|
||||||
map("n", "gd", "<cmd>Telescope lsp_definitions<CR>", { bufnr, "Definitions" })
|
|
||||||
map("n", "gT", "<cmd>Telescope lsp_type_definitions<CR>", { bufnr, "Type Definitions" })
|
|
||||||
map("n", "gr", "<cmd>Telescope lsp_references<CR>", { bufnr, "References" })
|
|
||||||
map("n", "gI", "<cmd>Telescope lsp_implementations<CR>", { bufnr, "Implementations" })
|
|
||||||
map("n", "gl", function()
|
|
||||||
vim.diagnostic.open_float(0, { scope = "line" })
|
|
||||||
end, { bufnr, "LSP Line Diagnostics" })
|
|
||||||
|
|
||||||
map("n", "<leader>la", vim.lsp.buf.code_action, { bufnr, "Code Action" })
|
|
||||||
map("n", "<leader>lr", vim.lsp.buf.rename, { bufnr, "Rename" })
|
|
||||||
map("n", "<leader>lf", vim.lsp.buf.format, { bufnr, "Format" })
|
|
||||||
map("n", "<leader>ld", "<cmd>Telescope diagnostics<CR>", { bufnr, "Workspace Diagnostics" })
|
|
||||||
map("n", "<leader>lD", "<cmd>Telescope diagnostics bufnr=0<CR>", { bufnr, "Buffer Diagnostics" })
|
|
||||||
map("n", "<leader>ls", "<cmd>Telescope lsp_document_symbols<CR>", { bufnr, "Document Symbols" })
|
|
||||||
map("n", "<leader>lS", "<cmd>Telescope lsp_workspace_symbols<CR>", { bufnr, "Workspace Symbols" })
|
|
||||||
map("n", "<leader>lwa", vim.lsp.buf.add_workspace_folder, { bufnr, "Add Workspace Folder" })
|
|
||||||
map("n", "<leader>lwr", vim.lsp.buf.remove_workspace_folder, { bufnr, "Remove Workspace Folder" })
|
|
||||||
map("n", "<leader>lwl", function()
|
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
|
||||||
end, { bufnr, "List Workspace Folders" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
@ -1,184 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local HOME = os.getenv("HOME")
|
|
||||||
local SDKMAN_DIR = os.getenv("SDKMAN_DIR")
|
|
||||||
|
|
||||||
local lsp = require("lsp")
|
|
||||||
local map = lsp.map
|
|
||||||
|
|
||||||
local jdtls = require("jdtls")
|
|
||||||
|
|
||||||
local bundles = {}
|
|
||||||
local mason_path = vim.fn.glob(vim.fn.stdpath("data") .. "/mason/")
|
|
||||||
vim.list_extend(bundles, vim.split(vim.fn.glob(mason_path .. "packages/java-test/extension/server/*.jar"), "\n"))
|
|
||||||
vim.list_extend(
|
|
||||||
bundles,
|
|
||||||
vim.split(
|
|
||||||
vim.fn.glob(mason_path .. "packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar"),
|
|
||||||
"\n"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
|
||||||
|
|
||||||
local function nnoremap(rhs, lhs, bufopts, desc)
|
|
||||||
bufopts.desc = desc
|
|
||||||
vim.keymap.set("n", rhs, lhs, bufopts)
|
|
||||||
end
|
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
|
||||||
lsp.default_config.on_attach(client, bufnr)
|
|
||||||
require("jdtls").setup_dap({ hotcodereplace = "auto" })
|
|
||||||
require("jdtls.dap").setup_dap_main_class_configs()
|
|
||||||
require("jdtls.setup").add_commands()
|
|
||||||
|
|
||||||
-- Java extensions provided by jdtls
|
|
||||||
map("n", "<leader>lo", jdtls.organize_imports, { bufnr, "Organize Imports" })
|
|
||||||
map("n", "<leader>lle", jdtls.extract_variable, { bufnr, "Extract Variable" })
|
|
||||||
map("n", "<leader>llc", jdtls.extract_constant, { bufnr, "Extract Constant" })
|
|
||||||
map("v", "<leader>llm", "<ESC><CMD>lua require('jdtls').extract_method(true)<CR>", { bufnr, "Extract Method" })
|
|
||||||
map("n", "<leader>ltc", jdtls.test_class, { bufnr, "Test Class (DAP)" })
|
|
||||||
map("n", "<leader>tm", jdtls.test_nearest_method, { bufnr, "Test Method (DAP)" })
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.make_jdtls_config(root_dir, workspace_folder)
|
|
||||||
return {
|
|
||||||
flags = {
|
|
||||||
debounce_text_changes = 80,
|
|
||||||
allow_incremental_sync = true,
|
|
||||||
},
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
root_dir = root_dir,
|
|
||||||
init_options = {
|
|
||||||
bundles = bundles,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- https://github.com/eclipse/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request
|
|
||||||
settings = {
|
|
||||||
java = {
|
|
||||||
project = {
|
|
||||||
referencedLibraries = {
|
|
||||||
HOME .. "/University/Y3/S2/programming-languages/warm-up/antlr.jar",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
format = {
|
|
||||||
settings = {
|
|
||||||
-- https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
|
|
||||||
url = "/.local/share/eclipse/eclipse-java-google-style.xml",
|
|
||||||
profile = "GoogleStyle",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
contentProvider = { preferred = "fernflower" }, -- Use fernflower to decompile library code
|
|
||||||
-- Specify any completion options
|
|
||||||
completion = {
|
|
||||||
maxResults = 30,
|
|
||||||
postfix = { enabled = true },
|
|
||||||
favoriteStaticMembers = {
|
|
||||||
"org.hamcrest.MatcherAssert.assertThat",
|
|
||||||
"org.hamcrest.Matchers.*",
|
|
||||||
"org.hamcrest.CoreMatchers.*",
|
|
||||||
"org.junit.jupiter.api.Assertions.*",
|
|
||||||
"java.util.Objects.requireNonNull",
|
|
||||||
"java.util.Objects.requireNonNullElse",
|
|
||||||
"org.mockito.Mockito.*",
|
|
||||||
},
|
|
||||||
filteredTypes = {
|
|
||||||
"com.sun.*",
|
|
||||||
"io.micrometer.shaded.*",
|
|
||||||
"java.awt.*",
|
|
||||||
"jdk.*",
|
|
||||||
"sun.*",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- LSP Related
|
|
||||||
implementationsCodeLens = { enabled = true },
|
|
||||||
referenceCodeLens = { enabled = true },
|
|
||||||
signatureHelp = { enabled = true },
|
|
||||||
inlayHints = {
|
|
||||||
parameterNames = { enabled = true },
|
|
||||||
},
|
|
||||||
-- Specify any options for organizing imports
|
|
||||||
sources = {
|
|
||||||
organizeImports = {
|
|
||||||
starThreshold = 9999,
|
|
||||||
staticStarThreshold = 9999,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
maven = {
|
|
||||||
downloadSources = true,
|
|
||||||
updateSnapshots = true,
|
|
||||||
},
|
|
||||||
-- On Save Cleanup
|
|
||||||
cleanup = {
|
|
||||||
actionsOnSave = {
|
|
||||||
"addOverride",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- How code generation should act
|
|
||||||
codeGeneration = {
|
|
||||||
toString = {
|
|
||||||
template = "${object.className}{${member.name()}=${member.value}, ${otherMembers}}",
|
|
||||||
},
|
|
||||||
hashCodeEquals = {
|
|
||||||
useJava7Objects = true,
|
|
||||||
},
|
|
||||||
useBlocks = true,
|
|
||||||
},
|
|
||||||
-- https://github.com/eclipse/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request
|
|
||||||
-- `interface RuntimeOption`
|
|
||||||
configuration = {
|
|
||||||
maven = {
|
|
||||||
userSettings = HOME .. "/.m2/settings.xml",
|
|
||||||
},
|
|
||||||
runtimes = {
|
|
||||||
{
|
|
||||||
name = "JavaSE-17",
|
|
||||||
path = SDKMAN_DIR .. "/candidates/java/17.0.5-amzn",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "JavaSE-11",
|
|
||||||
path = SDKMAN_DIR .. "/candidates/java/11.0.18-amzn",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "JavaSE-1.8",
|
|
||||||
path = SDKMAN_DIR .. "/candidates/java/8.0.362-amzn",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Note that eclipse.jdt.ls must be started with a Java version of 17 or higher
|
|
||||||
-- See: https://github.com/eclipse/eclipse.jdt.ls#running-from-the-command-line
|
|
||||||
cmd = {
|
|
||||||
SDKMAN_DIR .. "/candidates/java/17.0.5-amzn/bin/java",
|
|
||||||
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
|
||||||
"-Dosgi.bundles.defaultStartLevel=4",
|
|
||||||
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
|
||||||
"-Dlog.protocol=true",
|
|
||||||
"-Dlog.level=ALL",
|
|
||||||
"-Xmx4g",
|
|
||||||
"--add-modules=ALL-SYSTEM",
|
|
||||||
"--add-opens",
|
|
||||||
"java.base/java.util=ALL-UNNAMED",
|
|
||||||
"--add-opens",
|
|
||||||
"java.base/java.lang=ALL-UNNAMED",
|
|
||||||
-- If you use lombok, download the lombok jar and place it in ~/.local/share/eclipse
|
|
||||||
-- "-javaagent:"
|
|
||||||
-- .. HOME
|
|
||||||
-- .. "/.local/share/eclipse/lombok.jar",
|
|
||||||
|
|
||||||
"-jar",
|
|
||||||
vim.fn.glob(HOME .. "/.local/share/eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_*.jar"),
|
|
||||||
|
|
||||||
"-configuration",
|
|
||||||
HOME .. "/.local/share/eclipse.jdt.ls/config_linux",
|
|
||||||
|
|
||||||
"-data",
|
|
||||||
workspace_folder,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,88 +0,0 @@
|
|||||||
-- puts current line number on current line
|
|
||||||
-- relative line numbers on everything else
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
-- highlight line number
|
|
||||||
vim.opt.cursorline = true
|
|
||||||
|
|
||||||
-- free real estate
|
|
||||||
vim.opt.cmdheight = 0
|
|
||||||
|
|
||||||
-- don't show status
|
|
||||||
vim.opt.showmode = false
|
|
||||||
|
|
||||||
-- https://www.reddit.com/r/neovim/comments/10fpqbp/gist_statuscolumn_separate_diagnostics_and/
|
|
||||||
-- local M = {}
|
|
||||||
-- _G.Status = M
|
|
||||||
--
|
|
||||||
-- ---@return {name:string, text:string, texthl:string}[]
|
|
||||||
-- function M.get_signs()
|
|
||||||
-- local buf = vim.api.nvim_win_get_buf(vim.g.statusline_winid)
|
|
||||||
-- return vim.tbl_map(function(sign)
|
|
||||||
-- return vim.fn.sign_getdefined(sign.name)[1]
|
|
||||||
-- end, vim.fn.sign_getplaced(buf, { group = "*", lnum = vim.v.lnum })[1].signs)
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- function M.column()
|
|
||||||
-- local sign, git_sign
|
|
||||||
-- for _, s in ipairs(M.get_signs()) do
|
|
||||||
-- if s.name:find("GitSign") then
|
|
||||||
-- git_sign = s
|
|
||||||
-- else
|
|
||||||
-- sign = s
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- local components = {
|
|
||||||
-- sign and ("%#" .. sign.texthl .. "#" .. sign.text .. "%*") or " ",
|
|
||||||
-- [[%=]],
|
|
||||||
-- [[%{&nu?(&rnu&&v:relnum?v:relnum:v:lnum):''} ]],
|
|
||||||
-- git_sign and ("%#" .. git_sign.texthl .. "#" .. git_sign.text .. "%*") or " ",
|
|
||||||
-- }
|
|
||||||
-- return table.concat(components, "")
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- vim.opt.statuscolumn = [[%!v:lua.Status.column()]]
|
|
||||||
|
|
||||||
-- don't jump around when signs appear
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
|
|
||||||
-- default to 2 spaces for indentation
|
|
||||||
vim.opt.shiftwidth = 2
|
|
||||||
vim.opt.tabstop = 2
|
|
||||||
vim.opt.softtabstop = 2
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
|
|
||||||
-- keep some lines at the top/bottom/left/right of the window
|
|
||||||
vim.opt.scrolloff = 8
|
|
||||||
vim.opt.sidescrolloff = 8
|
|
||||||
|
|
||||||
-- smarter smartindent
|
|
||||||
vim.opt.cindent = true
|
|
||||||
|
|
||||||
-- global statusline
|
|
||||||
vim.opt.laststatus = 3
|
|
||||||
|
|
||||||
-- apparently this makes cmp work
|
|
||||||
vim.opt.completeopt = "menu,menuone,noselect"
|
|
||||||
|
|
||||||
-- live life dangerously
|
|
||||||
vim.opt.swapfile = true
|
|
||||||
vim.opt.backup = true
|
|
||||||
vim.opt.undofile = true
|
|
||||||
vim.opt.undodir = vim.fn.stdpath("data") .. "/undo/"
|
|
||||||
vim.opt.backupdir = vim.fn.stdpath("data") .. "/backup/"
|
|
||||||
vim.opt.directory = vim.fn.stdpath("data") .. "/swap/"
|
|
||||||
|
|
||||||
-- no more noh and incremental search highlighting
|
|
||||||
vim.opt.hlsearch = false
|
|
||||||
vim.opt.incsearch = true
|
|
||||||
|
|
||||||
-- make cursorhold happen faster
|
|
||||||
vim.opt.updatetime = 100
|
|
||||||
|
|
||||||
-- make which key show up faster
|
|
||||||
vim.opt.timeoutlen = 500
|
|
||||||
|
|
||||||
-- 24bit tui colours
|
|
||||||
vim.opt.termguicolors = true
|
|
@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
"mong8se/actually.nvim",
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
config = function()
|
|
||||||
local alpha = require("alpha")
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
dashboard.section.header.val = {
|
|
||||||
[[================= =============== =============== ======== ========]],
|
|
||||||
[[\\ . . . . . . .\\ //. . . . . . .\\ //. . . . . . .\\ \\. . .\\// . . //]],
|
|
||||||
[[||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\/ . . .||]],
|
|
||||||
[[|| . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . ||]],
|
|
||||||
[[||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .||]],
|
|
||||||
[[|| . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\ . . . . ||]],
|
|
||||||
[[||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\_ . .|. .||]],
|
|
||||||
[[|| . _|| || || || || ||_ . || || . _|| || || || |\ `-_/| . ||]],
|
|
||||||
[[||_-' || .|/ || || \|. || `-_|| ||_-' || .|/ || || | \ / |-_.||]],
|
|
||||||
[[|| ||_-' || || `-_|| || || ||_-' || || | \ / | `||]],
|
|
||||||
[[|| `' || || `' || || `' || || | \ / | ||]],
|
|
||||||
[[|| .===' `===. .==='.`===. .===' /==. | \/ | ||]],
|
|
||||||
[[|| .==' \_|-_ `===. .===' _|_ `===. .===' _-|/ `== \/ | ||]],
|
|
||||||
[[|| .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \/ | ||]],
|
|
||||||
[[|| .==' _-' '-__\._-' '-_./__-' `' |. /| | ||]],
|
|
||||||
[[||.==' _-' `' | /==.||]],
|
|
||||||
[[==' _-' N E O V I M \/ `==]],
|
|
||||||
[[\ _-' `-_ /]],
|
|
||||||
[[ `'' ``' ]],
|
|
||||||
}
|
|
||||||
|
|
||||||
dashboard.section.buttons.val = {
|
|
||||||
dashboard.button("f", " Find File", ":Telescope find_files<CR>"),
|
|
||||||
dashboard.button("e", " New File", ":ene <BAR> startinsert<CR>"),
|
|
||||||
dashboard.button("p", " Find Project", ":Telescope projects<CR>"),
|
|
||||||
dashboard.button("r", " Recent Files", ":Telescope oldfiles<CR>"),
|
|
||||||
dashboard.button("t", " Find Text", ":Telescope live_grep<CR>"),
|
|
||||||
dashboard.button("c", " Configuration", ":e $MYVIMRC<CR>"),
|
|
||||||
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
|
|
||||||
}
|
|
||||||
local function footer()
|
|
||||||
local total_plugins = require("lazy").stats().count
|
|
||||||
local datetime = os.date("%d-%m-%Y %H:%M:%S")
|
|
||||||
local plugins_text = " "
|
|
||||||
.. total_plugins
|
|
||||||
.. " plugins"
|
|
||||||
.. " v"
|
|
||||||
.. vim.version().major
|
|
||||||
.. "."
|
|
||||||
.. vim.version().minor
|
|
||||||
.. "."
|
|
||||||
.. vim.version().patch
|
|
||||||
.. " "
|
|
||||||
.. datetime
|
|
||||||
return plugins_text
|
|
||||||
end
|
|
||||||
|
|
||||||
dashboard.section.footer.val = footer()
|
|
||||||
dashboard.section.footer.opts.hl = "Type"
|
|
||||||
dashboard.section.buttons.opts.hl = "Keyword"
|
|
||||||
|
|
||||||
dashboard.opts.opts.noautocmd = false
|
|
||||||
|
|
||||||
dashboard.config.layout = {
|
|
||||||
{ type = "padding", val = 3 },
|
|
||||||
dashboard.section.header,
|
|
||||||
{ type = "padding", val = 2 },
|
|
||||||
dashboard.section.buttons,
|
|
||||||
{ type = "padding", val = 1 },
|
|
||||||
dashboard.section.footer,
|
|
||||||
}
|
|
||||||
|
|
||||||
alpha.setup(dashboard.opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
{ "superhawk610/ascii-blocks.nvim", cmd = "AsciiBlockify" },
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
{ "cloudysake/asciitree.nvim", cmd = "AsciiTree" },
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
config = function()
|
|
||||||
require("nvim-autopairs").setup({
|
|
||||||
disable_in_macro = true,
|
|
||||||
})
|
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|
||||||
local cmp = require("cmp")
|
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
local cp = require("catppuccin.palettes").get_palette()
|
|
||||||
|
|
||||||
require("catppuccin").setup({
|
|
||||||
flavour = "mocha",
|
|
||||||
transparent_background = true,
|
|
||||||
term_colors = true,
|
|
||||||
no_italic = true,
|
|
||||||
integrations = {
|
|
||||||
neogit = true,
|
|
||||||
mason = true,
|
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
underlines = {
|
|
||||||
errors = {},
|
|
||||||
hints = {},
|
|
||||||
warnings = {},
|
|
||||||
information = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
navic = {
|
|
||||||
enabled = true,
|
|
||||||
custom_bg = "NONE",
|
|
||||||
},
|
|
||||||
dap = {
|
|
||||||
enabled = true,
|
|
||||||
enable_ui = true,
|
|
||||||
},
|
|
||||||
cmp = true,
|
|
||||||
treesitter = true,
|
|
||||||
overseer = true,
|
|
||||||
telescope = true,
|
|
||||||
which_key = true,
|
|
||||||
},
|
|
||||||
color_overrides = {
|
|
||||||
mocha = {
|
|
||||||
base = "#000000",
|
|
||||||
mantle = "#000000",
|
|
||||||
surface2 = cp.subtext0,
|
|
||||||
overlay0 = cp.subtext0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
custom_highlights = {
|
|
||||||
ErrorMsg = { fg = cp.red, style = { "bold" } },
|
|
||||||
["@method.call"] = { fg = cp.blue },
|
|
||||||
["@constant"] = { fg = cp.sapphire },
|
|
||||||
LspInfoBorder = { link = "FloatBorder" },
|
|
||||||
PmenuSel = { bg = cp.surface0 },
|
|
||||||
FloatBorder = { fg = cp.overlay0, bg = "NONE" },
|
|
||||||
TelescopeBorder = { link = "FloatBorder" },
|
|
||||||
TelescopeMatching = { link = "TelescopeNormal" },
|
|
||||||
TelescopeSelection = { fg = "NONE", bg = cp.surface0 },
|
|
||||||
TelescopeTitle = { fg = cp.subtext0 },
|
|
||||||
QuickScopePrimary = { fg = cp.red },
|
|
||||||
QuickScopeSecondary = { fg = cp.peach },
|
|
||||||
|
|
||||||
DapStoppedLinehl = { bg = "#324430" },
|
|
||||||
DapBreakpointLinehl = { bg = "#492a32" },
|
|
||||||
|
|
||||||
NeogitDiffContextHighlight = { bg = "NONE" },
|
|
||||||
|
|
||||||
NavicText = { fg = cp.teal },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.cmd.colorscheme("catppuccin")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"uga-rosa/ccc.nvim",
|
|
||||||
opts = {
|
|
||||||
highlighter = { auto_enable = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,113 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
dependencies = {
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
config = function()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
history = true,
|
|
||||||
delete_check_events = "TextChanged",
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<tab>",
|
|
||||||
function()
|
|
||||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
|
||||||
end,
|
|
||||||
expr = true, silent = true, mode = "i",
|
|
||||||
},
|
|
||||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
|
||||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
version = false,
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local cmp_under_comparator = require("cmp-under-comparator")
|
|
||||||
local lspkind = require("lspkind")
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<A-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
|
||||||
["<A-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
|
||||||
["<A-p>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<A-n>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete({}),
|
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "nvim_lua" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
}, {
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
}),
|
|
||||||
sorting = {
|
|
||||||
comparators = {
|
|
||||||
cmp.config.compare.offset,
|
|
||||||
cmp.config.compare.exact,
|
|
||||||
cmp.config.compare.score,
|
|
||||||
cmp_under_comparator.under,
|
|
||||||
cmp.config.compare.kind,
|
|
||||||
cmp.config.compare.sort_text,
|
|
||||||
cmp.config.compare.length,
|
|
||||||
cmp.config.compare.order,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format({
|
|
||||||
mode = "symbol",
|
|
||||||
maxwidth = 30,
|
|
||||||
ellipsis_char = "…",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline({ "/", "?" }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-nvim-lua",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
"lukas-reineke/cmp-under-comparator",
|
|
||||||
"onsails/lspkind.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"andythigpen/nvim-coverage",
|
|
||||||
config = true,
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,136 +0,0 @@
|
|||||||
local get_python_path = function()
|
|
||||||
for _, client in pairs(vim.lsp.get_active_clients()) do
|
|
||||||
if client.name == "pyright" then
|
|
||||||
local path = client.config.settings.python.pythonPath
|
|
||||||
if path ~= nil then
|
|
||||||
return path
|
|
||||||
else
|
|
||||||
return "python"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"jayp0521/mason-nvim-dap.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
local dap = require("dap")
|
|
||||||
local mason_dap = require("mason-nvim-dap")
|
|
||||||
|
|
||||||
mason_dap.setup({
|
|
||||||
ensure_installed = { "python", "codelldb", "java-debug-adapter", "java-test" },
|
|
||||||
automatic_setup = true,
|
|
||||||
})
|
|
||||||
mason_dap.setup_handlers({
|
|
||||||
-- default handler
|
|
||||||
function(source)
|
|
||||||
require("mason-nvim-dap.automatic_setup")(source)
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- custom handlers
|
|
||||||
python = function(_)
|
|
||||||
dap.adapters.python = {
|
|
||||||
type = "executable",
|
|
||||||
command = "debugpy-adapter",
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.configurations.python = {
|
|
||||||
{
|
|
||||||
name = "Launch current file",
|
|
||||||
type = "python",
|
|
||||||
request = "launch",
|
|
||||||
program = "${file}",
|
|
||||||
pythonPath = get_python_path,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "Launch pytest",
|
|
||||||
type = "python",
|
|
||||||
request = "launch",
|
|
||||||
module = "pytest",
|
|
||||||
pythonPath = get_python_path,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.configurations.java = {
|
|
||||||
{
|
|
||||||
type = "java",
|
|
||||||
request = "attach",
|
|
||||||
name = "Debug (Attach) - Remote",
|
|
||||||
hostName = "127.0.0.1",
|
|
||||||
port = 5005,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- apply suggestions from catppuccin theme
|
|
||||||
local sign = vim.fn.sign_define
|
|
||||||
sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "DapBreakpointLinehl", numhl = "" })
|
|
||||||
sign("DapStopped", { text = "", texthl = "Error", linehl = "DapStoppedLinehl", numhl = "" })
|
|
||||||
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
|
|
||||||
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = "" })
|
|
||||||
end,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "<leader>bb", vim.cmd.DapToggleBreakpoint, desc = "Toggle Breakpoint" },
|
|
||||||
{ "<leader>bf", function() require("dap").list_breakpoints() end, desc = "List Breakpoints", },
|
|
||||||
{ "<leader>bc", function() require("dap").clear_breakpoints() end, desc = "Clear Breakpoints", },
|
|
||||||
|
|
||||||
{ "<leader>dc", vim.cmd.DapContinue, desc = "Start / Continue" },
|
|
||||||
{ "<leader>dj", function() require("dap").step_over() end, desc = "Step Over", },
|
|
||||||
{ "<leader>dk", function() require("dap").step_into() end, desc = "Step Into", },
|
|
||||||
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out", },
|
|
||||||
{ "<leader>dd", function() require("dap").disconnect() end, desc = "Disconnect", },
|
|
||||||
{ "<leader>dr", function() require("dap").restart() end, desc = "Restart", },
|
|
||||||
|
|
||||||
{ "<leader>du", function() require("dapui").toggle({}) end, desc = "Toggle UI", },
|
|
||||||
{ "<leader>dt", function() require("dap.repl").toggle() end, desc = "Toggle REPL", },
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
config = function()
|
|
||||||
local dap, dapui = require("dap"), require("dapui")
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
||||||
dapui.open()
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
opts = {
|
|
||||||
-- stylua: ignore
|
|
||||||
layouts = {
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{ id = "stacks", size = 0.15, },
|
|
||||||
{ id = "repl", size = 0.05, },
|
|
||||||
{ id = "scopes", size = 0.40, },
|
|
||||||
{ id = "watches", size = 0.40, },
|
|
||||||
},
|
|
||||||
position = "left",
|
|
||||||
size = 40,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{ id = "console", size = 1, },
|
|
||||||
},
|
|
||||||
position = "bottom",
|
|
||||||
size = 10,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ "theHamsta/nvim-dap-virtual-text", config = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"ja-ford/delaytrain.nvim",
|
|
||||||
opts = {
|
|
||||||
grace_period = 3,
|
|
||||||
ignore_filetypes = { "Neogit*", "help", "NvimTr*", "lazy", "mason" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
opts = {
|
|
||||||
input = {
|
|
||||||
insert_only = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"feline-nvim/feline.nvim",
|
|
||||||
config = function()
|
|
||||||
local feline = require("feline")
|
|
||||||
|
|
||||||
feline.setup({
|
|
||||||
components = require("extra.feline").get(),
|
|
||||||
force_inactive = {
|
|
||||||
filetypes = {
|
|
||||||
"^lazy$",
|
|
||||||
"^startify$",
|
|
||||||
"^fugitive$",
|
|
||||||
"^fugitiveblame$",
|
|
||||||
"^qf$",
|
|
||||||
"^help$",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
config = function()
|
|
||||||
require("gitsigns").setup({
|
|
||||||
on_attach = function(bufnr)
|
|
||||||
local gs = package.loaded.gitsigns
|
|
||||||
|
|
||||||
local function map(mode, l, r, opts, desc)
|
|
||||||
opts = opts or {}
|
|
||||||
opts.buffer = bufnr
|
|
||||||
opts.desc = desc
|
|
||||||
vim.keymap.set(mode, l, r, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Navigation
|
|
||||||
map("n", "]c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "]c"
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
|
||||||
gs.next_hunk()
|
|
||||||
end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true }, "Next Hunk")
|
|
||||||
|
|
||||||
map("n", "[c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
return "[c"
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
|
||||||
gs.prev_hunk()
|
|
||||||
end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true }, "Previous Hunk")
|
|
||||||
|
|
||||||
-- Actions
|
|
||||||
map({ "n", "v" }, "<leader>gg", ":Neogit<CR>", {}, "Open Git")
|
|
||||||
map({ "n", "v" }, "<leader>gs", ":Gitsigns stage_hunk<CR>", {}, "Stage Hunk")
|
|
||||||
map({ "n", "v" }, "<leader>gr", ":Gitsigns reset_hunk<CR>", {}, "Reset Hunk")
|
|
||||||
map("n", "<leader>gS", gs.stage_buffer, {}, "Stage Buffer")
|
|
||||||
map("n", "<leader>gu", gs.undo_stage_hunk, {}, "Undo Stage Hunk")
|
|
||||||
map("n", "<leader>gR", gs.reset_buffer, {}, "Reset Buffer")
|
|
||||||
map("n", "<leader>gp", gs.preview_hunk, {}, "Preview Hunk")
|
|
||||||
map("n", "<leader>gb", function()
|
|
||||||
gs.blame_line({ full = true })
|
|
||||||
end, {}, "Show Blame")
|
|
||||||
map("n", "<leader>gb", gs.toggle_current_line_blame, {}, "Current Line Blame")
|
|
||||||
map("n", "<leader>gd", gs.toggle_deleted, {}, "Show Deleted")
|
|
||||||
|
|
||||||
-- Text object
|
|
||||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,193 +0,0 @@
|
|||||||
local lsp = require("lsp")
|
|
||||||
|
|
||||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
|
||||||
underline = {
|
|
||||||
severity = { max = vim.diagnostic.severity.WARN },
|
|
||||||
},
|
|
||||||
virtual_text = {
|
|
||||||
severity = { min = vim.diagnostic.severity.ERROR },
|
|
||||||
},
|
|
||||||
float = { border = "rounded" },
|
|
||||||
update_in_insert = true,
|
|
||||||
})
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
|
|
||||||
|
|
||||||
local custom_config = function(config)
|
|
||||||
local merged_config = vim.deepcopy(lsp.default_config)
|
|
||||||
merged_config = vim.tbl_extend("force", merged_config, config)
|
|
||||||
return merged_config
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
config = function()
|
|
||||||
require("mason-lspconfig").setup({
|
|
||||||
ensure_installed = { "rust_analyzer", "pyright", "lua_ls", "marksman" },
|
|
||||||
})
|
|
||||||
require("mason-lspconfig").setup_handlers({
|
|
||||||
-- default handler
|
|
||||||
function(server_name)
|
|
||||||
require("lspconfig")[server_name].setup(lsp.default_config)
|
|
||||||
end,
|
|
||||||
|
|
||||||
["ltex"] = function()
|
|
||||||
require("lspconfig")["ltex"].setup(lsp.default_config)
|
|
||||||
require("ltex_extra").setup({
|
|
||||||
load_langs = { "es-AR", "en-US" },
|
|
||||||
init_check = true,
|
|
||||||
path = vim.fn.stdpath("data") .. "/dictionary",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
|
|
||||||
["rust_analyzer"] = function()
|
|
||||||
-- https://github.com/simrat39/rust-tools.nvim/issues/300
|
|
||||||
local config = custom_config({
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
inlayHints = { locationLinks = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("rust-tools").setup({
|
|
||||||
server = config,
|
|
||||||
dap = {
|
|
||||||
adapter = {
|
|
||||||
type = "server",
|
|
||||||
port = "${port}",
|
|
||||||
host = "127.0.0.1",
|
|
||||||
executable = {
|
|
||||||
command = "codelldb",
|
|
||||||
args = { "--port", "${port}" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
|
|
||||||
["pyright"] = function()
|
|
||||||
require("py_lsp").setup(lsp.default_config)
|
|
||||||
end,
|
|
||||||
|
|
||||||
["lua_ls"] = function()
|
|
||||||
require("lspconfig")["lua_ls"].setup(custom_config({
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
format = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
},
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = {
|
|
||||||
ui = { border = "rounded" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ "folke/neodev.nvim", config = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"simrat39/rust-tools.nvim",
|
|
||||||
{
|
|
||||||
"ray-x/go.nvim",
|
|
||||||
dependencies = { -- optional packages
|
|
||||||
"ray-x/guihua.lua",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("go").setup()
|
|
||||||
end,
|
|
||||||
event = { "CmdlineEnter" },
|
|
||||||
ft = { "go", "gomod" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mrcjkb/haskell-tools.nvim",
|
|
||||||
branch = "1.x.x",
|
|
||||||
config = function()
|
|
||||||
local ht = require("haskell-tools")
|
|
||||||
local def_opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
ht.setup({
|
|
||||||
hls = {
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
local opts = vim.tbl_extend("keep", def_opts, { buffer = bufnr })
|
|
||||||
-- haskell-language-server relies heavily on codeLenses,
|
|
||||||
-- so auto-refresh (see advanced configuration) is enabled by default
|
|
||||||
vim.keymap.set("n", "<space>ca", vim.lsp.codelens.run, opts)
|
|
||||||
vim.keymap.set("n", "<space>le", ht.lsp.buf_eval_all, opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"HallerPatrick/py_lsp.nvim",
|
|
||||||
"mfussenegger/nvim-jdtls",
|
|
||||||
{
|
|
||||||
"ray-x/lsp_signature.nvim",
|
|
||||||
opts = {
|
|
||||||
hint_enable = false,
|
|
||||||
hint_prefix = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"barreiroleo/ltex_extra.nvim",
|
|
||||||
"lervag/vimtex",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
config = function()
|
|
||||||
local null_ls = require("null-ls")
|
|
||||||
null_ls.setup({
|
|
||||||
sources = {
|
|
||||||
null_ls.builtins.formatting.ruff,
|
|
||||||
null_ls.builtins.formatting.yamlfmt,
|
|
||||||
null_ls.builtins.formatting.latexindent,
|
|
||||||
null_ls.builtins.formatting.beautysh,
|
|
||||||
null_ls.builtins.formatting.stylua.with({
|
|
||||||
extra_args = { "--indent-type", "spaces" },
|
|
||||||
}),
|
|
||||||
null_ls.builtins.diagnostics.markdownlint,
|
|
||||||
null_ls.builtins.formatting.mdformat.with({
|
|
||||||
extra_args = { "--wrap", "80", "--number" },
|
|
||||||
}),
|
|
||||||
-- null_ls.builtins.formatting.black,
|
|
||||||
-- null_ls.builtins.formatting.isort.with({
|
|
||||||
-- extra_args = { "--profile", "black" },
|
|
||||||
-- }),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jay-babu/mason-null-ls.nvim",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = { "stylua", "markdownlint", "clang-format" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
build = "cd app && yarn install",
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"echasnovski/mini.nvim",
|
|
||||||
config = function()
|
|
||||||
-- add gc/gcc actions, gc textobject
|
|
||||||
require("mini.comment").setup({})
|
|
||||||
|
|
||||||
-- highlight word under cursor
|
|
||||||
require("mini.cursorword").setup({ delay = 0 })
|
|
||||||
|
|
||||||
-- indent lines, `i` textobject, `]i`/`[i` motions
|
|
||||||
require("mini.indentscope").setup({
|
|
||||||
draw = {
|
|
||||||
delay = 0,
|
|
||||||
animation = require("mini.indentscope").gen_animation.none(),
|
|
||||||
},
|
|
||||||
symbol = "│",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"TimUntersberger/neogit",
|
|
||||||
config = true,
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"SmiteshP/nvim-navic",
|
|
||||||
dependencies = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"nvim-tree/nvim-web-devicons", -- optional dependency
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
highlight = true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-tree/nvim-tree.lua",
|
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
|
||||||
config = function()
|
|
||||||
require("nvim-tree").setup({
|
|
||||||
hijack_cursor = true,
|
|
||||||
hijack_netrw = false,
|
|
||||||
sync_root_with_cwd = true,
|
|
||||||
respect_buf_cwd = true,
|
|
||||||
update_focused_file = {
|
|
||||||
enable = true,
|
|
||||||
update_root = false,
|
|
||||||
},
|
|
||||||
view = {
|
|
||||||
centralize_selection = true,
|
|
||||||
width = {
|
|
||||||
max = 60
|
|
||||||
}
|
|
||||||
},
|
|
||||||
renderer = {
|
|
||||||
group_empty = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "<leader>e", "<cmd>NvimTreeToggle<cr>", desc = "Open Explorer" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/overseer.nvim",
|
|
||||||
config = true,
|
|
||||||
cmd = { "OverseerRun", "OverseerToggle" },
|
|
||||||
keys = {
|
|
||||||
{ "<leader>tr", vim.cmd.OverseerRun, desc = "Run Task" },
|
|
||||||
{ "<leader>tt", vim.cmd.OverseerToggle, desc = "Toggle task results" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"andweeb/presence.nvim",
|
|
||||||
opts = {
|
|
||||||
neovim_image_text = "Home Sweet Home"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"ahmedkhalf/project.nvim",
|
|
||||||
config = function()
|
|
||||||
require("project_nvim").setup({
|
|
||||||
patterns = {
|
|
||||||
".git",
|
|
||||||
"_darcs",
|
|
||||||
".hg",
|
|
||||||
".bzr",
|
|
||||||
".svn",
|
|
||||||
"Makefile",
|
|
||||||
"package.json",
|
|
||||||
"wezterm.lua",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"unblevable/quick-scope",
|
|
||||||
init = function()
|
|
||||||
vim.g.qs_highlight_on_keys = { "f", "F", "t", "T" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"luukvbaal/statuscol.nvim",
|
|
||||||
opts = {
|
|
||||||
separator = " ",
|
|
||||||
setopt = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"kylechui/nvim-surround",
|
|
||||||
config = true,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("projects")
|
|
||||||
require("telescope").load_extension("fzy_native")
|
|
||||||
require("telescope").load_extension("catppuccin")
|
|
||||||
require("telescope").load_extension("smart_open")
|
|
||||||
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
require("telescope").setup({
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<A-j>"] = actions.move_selection_next,
|
|
||||||
["<A-k>"] = actions.move_selection_previous,
|
|
||||||
["<A-n>"] = actions.cycle_history_next,
|
|
||||||
["<A-p>"] = actions.cycle_history_prev,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
["<A-j>"] = actions.move_selection_next,
|
|
||||||
["<A-k>"] = actions.move_selection_previous,
|
|
||||||
["<A-n>"] = actions.preview_scrolling_down,
|
|
||||||
["<A-p>"] = actions.preview_scrolling_up,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "<leader>ff", "<cmd>Telescope smart_open<cr>", "Find Files" },
|
|
||||||
{ "<leader>fp", "<cmd>Telescope projects<cr>", "All Projects" },
|
|
||||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", "Recent Files" },
|
|
||||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", "Find Text" },
|
|
||||||
{ "<leader>fh", "<cmd>Telescope highlights<cr>", "Find Highlights" },
|
|
||||||
{ "<leader>fc", "<cmd>Telescope current_buffer_fuzzy_find<cr>", "Find In File" },
|
|
||||||
{ "<leader>fC", "<cmd>Telescope catppuccin<cr>", "Catppuccin Colours" },
|
|
||||||
{ "<leader>fj", "<cmd>Telescope jumplist<cr>", "Jumplist" },
|
|
||||||
},
|
|
||||||
cmd = "Telescope",
|
|
||||||
dependencies = {
|
|
||||||
"backwardspy/telescope-catppuccin.nvim",
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-fzy-native.nvim",
|
|
||||||
dependencies = { "kkharji/sqlite.lua" },
|
|
||||||
},
|
|
||||||
"danielfalk/smart-open.nvim",
|
|
||||||
"backwardspy/telescope-catppuccin.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
build = function()
|
|
||||||
local ts_update = require("nvim-treesitter.install").update({ with_sync = true })
|
|
||||||
ts_update()
|
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
ensure_installed = "all",
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = false },
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true,
|
|
||||||
keymaps = {
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
["aa"] = "@parameter.outer",
|
|
||||||
["ia"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
"nvim-treesitter/playground",
|
|
||||||
{
|
|
||||||
"kana/vim-textobj-entire",
|
|
||||||
dependencies = { "kana/vim-textobj-user" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
config = function()
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.setup({
|
|
||||||
window = {
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
wk.register({
|
|
||||||
f = { name = "Find" },
|
|
||||||
g = { name = "Git" },
|
|
||||||
-- j = { name = "Jump" },
|
|
||||||
l = { name = "LSP" },
|
|
||||||
-- o = { name = "Open" },
|
|
||||||
t = { name = "Tasks" },
|
|
||||||
d = { name = "Debug" },
|
|
||||||
b = { name = "Breakpoint" },
|
|
||||||
z = { name = "Zen" },
|
|
||||||
}, { prefix = "<leader>" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
local extremely_zen = function()
|
|
||||||
require("zen-mode").toggle({ plugins = { twilight = { enabled = true } } })
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"folke/zen-mode.nvim",
|
|
||||||
opts = {
|
|
||||||
plugins = {
|
|
||||||
twilight = { enabled = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cmd = { "ZenMode" },
|
|
||||||
keys = {
|
|
||||||
{ "<leader>zz", "<cmd>ZenMode<cr>", desc = "Zen Mode" },
|
|
||||||
{ "<leader>Z", extremely_zen, desc = "Extremely Zen Mode" },
|
|
||||||
},
|
|
||||||
dependencies = { "folke/twilight.nvim" },
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
column_width = 120
|
|
||||||
line_endings = "Unix"
|
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
quote_style = "AutoPreferDouble"
|
|
||||||
call_parentheses = "Always"
|
|
||||||
collapse_simple_statement = "Never"
|
|
@ -1,7 +0,0 @@
|
|||||||
column_width = 120
|
|
||||||
line_endings = "Unix"
|
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
quote_style = "AutoPreferDouble"
|
|
||||||
call_parentheses = "Always"
|
|
||||||
collapse_simple_statement = "Never"
|
|
@ -1,13 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = sgoudham
|
|
||||||
email = sgoudham@gmail.com
|
|
||||||
signingkey = 44E818FD5457EEA4
|
|
||||||
[commit]
|
|
||||||
gpgsign = true
|
|
||||||
[core]
|
|
||||||
autocrlf = input
|
|
||||||
editor = lvim
|
|
||||||
[push]
|
|
||||||
autoSetupRemote = true
|
|
||||||
[init]
|
|
||||||
defaultBranch = main
|
|
@ -1,48 +0,0 @@
|
|||||||
# Needed for .antidote
|
|
||||||
# https://github.com/mattmc3/antidote/issues/24
|
|
||||||
autoload -Uz compinit && compinit
|
|
||||||
|
|
||||||
# I don't even know anymore...
|
|
||||||
# https://github.com/ohmyzsh/ohmyzsh/issues/10581
|
|
||||||
source <(kubectl completion zsh)
|
|
||||||
|
|
||||||
# PATH
|
|
||||||
export PATH="$PATH:$HOME/.local/bin"
|
|
||||||
export PATH="$PATH:$HOME/.local/scripts"
|
|
||||||
export PATH="$PATH:$HOME/.local/share/nvim/mason/bin"
|
|
||||||
|
|
||||||
# Krew
|
|
||||||
export PATH="$PATH:${KREW_ROOT:-$HOME/.krew}/bin"
|
|
||||||
|
|
||||||
# JetBrains Toolbox
|
|
||||||
export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
|
|
||||||
|
|
||||||
# Go
|
|
||||||
export PATH="$PATH:$HOME/.local/share/go/bin"
|
|
||||||
|
|
||||||
# Rust
|
|
||||||
source "$HOME/.cargo/env"
|
|
||||||
|
|
||||||
# Haskell (ghcup-env)
|
|
||||||
[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env"
|
|
||||||
|
|
||||||
# Deno
|
|
||||||
export DENO_INSTALL="$HOME/.deno"
|
|
||||||
export PATH="$DENO_INSTALL/bin:$PATH"
|
|
||||||
|
|
||||||
# Config Directory
|
|
||||||
export XDG_CONFIG_HOME=$HOME/.config
|
|
||||||
|
|
||||||
# WezTerm By Default
|
|
||||||
export TERMINAL=wezterm-gui
|
|
||||||
|
|
||||||
# Editing
|
|
||||||
export EDITOR="nvim"
|
|
||||||
export SUDO_EDITOR=$(which nvim)
|
|
||||||
|
|
||||||
# Go
|
|
||||||
export GOPATH="$HOME/.local/share/go"
|
|
||||||
|
|
||||||
# Java
|
|
||||||
export JAVA_HOME="$SDKMAN_DIR/candidates/java/current"
|
|
||||||
export GRAALVM_HOME="$SDKMAN_DIR/candidates/java/22.3.r17-grl"
|
|
@ -1,142 +0,0 @@
|
|||||||
# vim:ft=zsh:fenc=utf-8
|
|
||||||
|
|
||||||
# Shell Integration
|
|
||||||
source "$HOME/.config/wezterm/wezterm.sh"
|
|
||||||
|
|
||||||
# Prompt
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
# source antidote
|
|
||||||
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
|
|
||||||
|
|
||||||
# set omz variables
|
|
||||||
ZSH=$(antidote path ohmyzsh/ohmyzsh)
|
|
||||||
ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/oh-my-zsh"
|
|
||||||
[[ -d $ZSH_CACHE_DIR ]] || mkdir -p $ZSH_CACHE_DIR
|
|
||||||
|
|
||||||
# initialize plugins statically with ${ZDOTDIR:-~}/.zsh_plugins.txt
|
|
||||||
antidote load
|
|
||||||
|
|
||||||
# Make 'less' friendlier for non-text input files, see lesspipe(1)
|
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
|
||||||
|
|
||||||
# Konf
|
|
||||||
# source <(konf-go shellwrapper zsh)
|
|
||||||
# Autocompletion
|
|
||||||
# source <(konf completion zsh)
|
|
||||||
# Auto load context
|
|
||||||
# export KUBECONFIG=$(konf set -)
|
|
||||||
|
|
||||||
# Aliases
|
|
||||||
alias magit="nvim '+Neogit kind=replace'"
|
|
||||||
alias clipboard='xclip -sel clip'
|
|
||||||
alias dc="docker compose"
|
|
||||||
alias dcud="docker compose down && docker compose up -d"
|
|
||||||
alias kctx="konf set"
|
|
||||||
alias kns="konf ns"
|
|
||||||
|
|
||||||
# Keep History
|
|
||||||
export HISTFILE="$HOME/.zhistory"
|
|
||||||
export HISTSIZE=10000
|
|
||||||
export SAVEHIST=10000
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt HIST_IGNORE_DUPS
|
|
||||||
|
|
||||||
# Coloured GCC warnings and errors
|
|
||||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
||||||
|
|
||||||
# Use 'iHD' by default
|
|
||||||
export LIBVA_DRIVER_NAME="iHD"
|
|
||||||
|
|
||||||
# Color support of 'ls' and also add aliases
|
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make directories & cd into them
|
|
||||||
function mkcd() {
|
|
||||||
mkdir -p $@ && cd ${@:$#}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Use 'wezterm ssh' if available
|
|
||||||
function ssh() {
|
|
||||||
if [[ "$TERM_PROGRAM" == "WezTerm" ]]; then
|
|
||||||
bj wezterm ssh $@
|
|
||||||
else
|
|
||||||
echo "Falling back to normal 'ssh' as WezTerm hasn't been detected"
|
|
||||||
command ssh $@
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Easily run background jobs
|
|
||||||
function bj() {
|
|
||||||
nohup $@ </dev/null &>/dev/null &
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Display images in the terminal
|
|
||||||
function icat() {
|
|
||||||
function display() {
|
|
||||||
if [[ "$TERM_PROGRAM" == "WezTerm" ]]; then
|
|
||||||
cat - | wezterm imgcat
|
|
||||||
elif [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
|
||||||
cat - | $(alias imgcat | cut -d "=" -f2-)
|
|
||||||
elif [[ "$TERM" = "xterm-kitty" ]]; then
|
|
||||||
cat - | kitty +kitten icat
|
|
||||||
else
|
|
||||||
echo "No image viewer defined for this terminal" && return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
function displaySVG() {
|
|
||||||
[[ ! -x "$(command -v convert)" ]] && echo "convert not found, install imagemagick" && return 1
|
|
||||||
convert -background none -density 192 - png:- | display
|
|
||||||
}
|
|
||||||
function displayVID() {
|
|
||||||
ffmpeg -i "$1" -vf scale=720:-1 -r 10 -f image2pipe -vcodec ppm - &>/dev/null | convert -delay 10 -loop 1 - gif:- | display
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -t 0 ]; then
|
|
||||||
input="$(cat - | base64)"
|
|
||||||
headers="$(echo "$input" | base64 -d | file - --mime-type | cut -d " " -f2-)"
|
|
||||||
|
|
||||||
case $headers in
|
|
||||||
*svg*) echo "$input" | base64 -d | displaySVG ;;
|
|
||||||
*video*) echo "haven't figured this part out yet" && return 1;;
|
|
||||||
*image*) echo "$input" | base64 -d | display ;;
|
|
||||||
*) echo "Unknown file type" && return 1 ;;
|
|
||||||
esac
|
|
||||||
elif [[ "$1" == http* ]]; then
|
|
||||||
case "$(curl -sSLI "$1" | grep -i "^content-type:")" in
|
|
||||||
*svg*) curl -fsSL "$1" | displaySVG ;;
|
|
||||||
*video*) echo "haven't figured this part out yet" && return 1;;
|
|
||||||
*image*) curl -fsSL "$1" | display ;;
|
|
||||||
*) echo "Unknown file type" && return 1 ;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
[[ -z "$1" ]] && echo "Usage: icat <file|url>" && return 1
|
|
||||||
[[ ! -f "$1" ]] && echo "File not found: $1" && return 1
|
|
||||||
case "$(file -b --mime-type "$1")" in
|
|
||||||
*svg*) cat "$1" | displaySVG ;;
|
|
||||||
*video*) displayVID $1 ;;
|
|
||||||
*image*) cat "$1" | display ;;
|
|
||||||
*) echo "Unknown file type" && return 1 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# export M2_HOME="$HOME/.local/bin/apache-maven-3.8.6/bin"
|
|
||||||
# export PATH="$PATH:$M2_HOME"
|
|
||||||
|
|
||||||
# Node
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
||||||
|
|
||||||
eval "$(direnv hook zsh)"
|
|
||||||
|
|
||||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
@ -0,0 +1,236 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"crane": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676846788,
|
||||||
|
"narHash": "sha256-XLsHLgXyMdliMeAXuzdGP+TXBaV44kG1RPTUHNOs6Jk=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "953b70da2813fb882c39890f2514e7db76fc8843",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"ref": "v0.11.3",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673956053,
|
||||||
|
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676283394,
|
||||||
|
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1683833146,
|
||||||
|
"narHash": "sha256-ELF0oXgg0NYGyKtU74HW8CeLstFJwwCGbuahnQla67I=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "cc9f65d104e5227d103a529a9fc3687ef4ccb117",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nekowinston-nur": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"wezterm-src": "wezterm-src"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685775911,
|
||||||
|
"narHash": "sha256-bXuKB89qJnUbE6h0Q677UC6aKh+9Yi3tGSbqqO0cs3A=",
|
||||||
|
"owner": "nekowinston",
|
||||||
|
"repo": "nur",
|
||||||
|
"rev": "8912d039043c039ba0bb5a1a7ff51c2efee57202",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nekowinston",
|
||||||
|
"repo": "nur",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-index-database": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1683638468,
|
||||||
|
"narHash": "sha256-tQEaGZfZ2Hpw+XIVEHaJ8FaF1yNQyMDDhUyIQ7LTIEg=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"rev": "219067a5e3cf4b9581c8b4fcfc59ecd5af953d07",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676426280,
|
||||||
|
"narHash": "sha256-7DltKPrvCP0A9Iemv2ts1vnBYn5xQKScK/sb1VALlao=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6d33e5e14fd12f99ba621683ae90cebadda753ca",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685677062,
|
||||||
|
"narHash": "sha256-zoHF7+HNwNwne2XEomphbdc4Y8tdWT16EUxUTXpOKpQ=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "95be94370d09f97f6af6a1df1eb9649b5260724e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1687288566,
|
||||||
|
"narHash": "sha256-VckkiJ88Gzdc2cstm0z5eFcrHbvkm4VjxavHBGssvZI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b6c73c5fe53bb3afbf65e870541e0645e9145171",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nur": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685803539,
|
||||||
|
"narHash": "sha256-S/yHjHu4xrcuT9VyVPKWGPjOSYyY8hG9//1X6F8urpI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nur",
|
||||||
|
"rev": "364559535aae66fbc459d5190b0feb264a619d06",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nur",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nekowinston-nur": "nekowinston-nur",
|
||||||
|
"nix-index-database": "nix-index-database",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"nur": "nur"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nekowinston-nur",
|
||||||
|
"crane",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nekowinston-nur",
|
||||||
|
"crane",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676437770,
|
||||||
|
"narHash": "sha256-mhJye91Bn0jJIE7NnEywGty/U5qdELfsT8S+FBjTdG4=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "a619538647bd03e3ee1d7b947f7c11ff289b376e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wezterm-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685453249,
|
||||||
|
"narHash": "sha256-w/iQoWng7nrE+HAg0umpq8RCU0bjw5JogR2HHufspI8=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "95e44f2199d9779e353bccf387a1eb2dbaf41f44",
|
||||||
|
"revCount": 7255,
|
||||||
|
"submodules": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/wez/wezterm"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"submodules": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/wez/wezterm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
description = "Home Manager configuration of hammy";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
# At the time of writing, nixos-unstable doesn't work for home manager
|
||||||
|
# FIXME: https://github.com/NixOS/nixpkgs/issues/236940#issuecomment-1585223723
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||||
|
nur.url = "github:nix-community/nur";
|
||||||
|
nekowinston-nur.url = "github:nekowinston/nur";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||||
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [
|
||||||
|
"https://nekowinston.cachix.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"nekowinston.cachix.org-1:lucpmaO+JwtoZj16HCO1p1fOv68s/RL1gumpVzRHRDs="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
extra-trusted-users = ["@wheel"];
|
||||||
|
tarball-ttl = 604800;
|
||||||
|
warn-dirty = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
nixpkgs,
|
||||||
|
nur,
|
||||||
|
nekowinston-nur,
|
||||||
|
home-manager,
|
||||||
|
nix-index-database,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
overlays = final: prev: {
|
||||||
|
nur = import nur {
|
||||||
|
nurpkgs = prev;
|
||||||
|
pkgs = prev;
|
||||||
|
repoOverrides = {
|
||||||
|
nekowinston = nekowinston-nur.packages.${prev.system};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
homeConfigurations."hammy" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
# Specify your home configuration modules here, for example,
|
||||||
|
# the path to your home.nix.
|
||||||
|
modules = [
|
||||||
|
./home
|
||||||
|
nix-index-database.hmModules.nix-index
|
||||||
|
({config, ...}: {
|
||||||
|
config = {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
overlays
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
extraSpecialArgs = {
|
||||||
|
flakePath =
|
||||||
|
if pkgs.stdenv.isDarwin
|
||||||
|
then "/Users/hammy/.config/home-manager"
|
||||||
|
else "/home/hammy/.config/home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
deno
|
||||||
|
];
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
function bj --description "easily run background jobs"
|
||||||
|
nohup $argv </dev/null &>/dev/null &
|
||||||
|
end
|
@ -0,0 +1,8 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
(iosevka-bin.override {variant = "sgr-iosevka-term";})
|
||||||
|
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||||
|
victor-mono
|
||||||
|
];
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
userEmail = "sgoudham@gmail.com";
|
||||||
|
userName = "sgoudham";
|
||||||
|
signing = {
|
||||||
|
signByDefault = true;
|
||||||
|
key = "44E818FD5457EEA4";
|
||||||
|
};
|
||||||
|
difftastic = {
|
||||||
|
enable = true;
|
||||||
|
background = "dark";
|
||||||
|
};
|
||||||
|
ignores = [
|
||||||
|
# General
|
||||||
|
".DS_Store"
|
||||||
|
".DS_Store?"
|
||||||
|
"Thumbs.db"
|
||||||
|
"desktop.ini"
|
||||||
|
# Temporary Files
|
||||||
|
"*.bak"
|
||||||
|
"*.swp"
|
||||||
|
"*.swo"
|
||||||
|
"*~"
|
||||||
|
# Editors
|
||||||
|
".idea/"
|
||||||
|
".iml"
|
||||||
|
# Nix
|
||||||
|
".direnv/"
|
||||||
|
".envrc"
|
||||||
|
# Rust
|
||||||
|
"target/"
|
||||||
|
# Node
|
||||||
|
"node_modules/"
|
||||||
|
];
|
||||||
|
extraConfig = {
|
||||||
|
push.autoSetupRemote = true;
|
||||||
|
core = {
|
||||||
|
autocrlf = "input";
|
||||||
|
editor = "nvim";
|
||||||
|
};
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{config, ...}: {
|
||||||
|
programs.go.enable = true;
|
||||||
|
home.sessionVariables = {
|
||||||
|
GOPATH = "${config.xdg.dataHome}/go";
|
||||||
|
};
|
||||||
|
home.sessionPath = [
|
||||||
|
"${config.home.sessionVariables.GOPATH}/bin"
|
||||||
|
];
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
(wrapHelm kubernetes-helm {plugins = [kubernetes-helmPlugins.helm-diff];})
|
||||||
|
kubectl
|
||||||
|
kubectx
|
||||||
|
kubeseal
|
||||||
|
krew
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionPath = [
|
||||||
|
"${config.home.sessionVariables.KREW_ROOT}/bin"
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
KREW_ROOT = "${config.xdg.dataHome}/krew";
|
||||||
|
KUBECACHEDIR = "${config.xdg.cacheHome}/kube";
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = [pkgs.nap];
|
||||||
|
home.sessionVariables = {
|
||||||
|
NAP_THEME = "catppuccin_mocha";
|
||||||
|
NAP_PRIMARY_COLOR = "#f5c2e7";
|
||||||
|
NAP_RED = "#f38ba8";
|
||||||
|
NAP_GREEN = "#a6e3a1";
|
||||||
|
NAP_FOREGROUND = "#b4befe";
|
||||||
|
NAP_BACKGROUND = "#11111b";
|
||||||
|
NAP_BLACK = "#11111b";
|
||||||
|
NAP_GRAY = "#bac2de";
|
||||||
|
NAP_WHITE = "#FFFFFF";
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rustup
|
||||||
|
sccache
|
||||||
|
mdbook
|
||||||
|
];
|
||||||
|
home.sessionVariables = {
|
||||||
|
RUSTC_WRAPPER = "sccache";
|
||||||
|
};
|
||||||
|
home.sessionPath = [
|
||||||
|
"$HOME/.cargo/bin"
|
||||||
|
];
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
git fetch $1 pull/$2/head:pull-request-$2
|
git fetch $1 pull/$2/head:pull-request-$2
|
||||||
git checkout pull-request-$2
|
git checkout pull-request-$2
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
gsettings set org.gnome.mutter dynamic-workspaces true
|
gsettings set org.gnome.mutter dynamic-workspaces true
|
||||||
gsettings set org.gnome.desktop.wm.preferences num-workspaces 4
|
gsettings set org.gnome.desktop.wm.preferences num-workspaces 4
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
gsettings set org.gnome.mutter dynamic-workspaces false
|
gsettings set org.gnome.mutter dynamic-workspaces false
|
||||||
gsettings set org.gnome.desktop.wm.preferences num-workspaces 12
|
gsettings set org.gnome.desktop.wm.preferences num-workspaces 12
|
@ -0,0 +1,70 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
local MAPPINGS='
|
||||||
|
video/3gpp,3gp
|
||||||
|
video/3gpp2,3g2
|
||||||
|
video/MP2T,mpegts
|
||||||
|
video/MP2T,mpegtsraw
|
||||||
|
video/mp4,mp4
|
||||||
|
video/mpeg,mpeg
|
||||||
|
video/ogg,ogv
|
||||||
|
video/quicktime,mov
|
||||||
|
video/webm,webm
|
||||||
|
'
|
||||||
|
# format=$(echo "$MAPPINGS" | grep "$headers" | cut -d "," -f2-)
|
||||||
|
|
||||||
|
function icat() {
|
||||||
|
function display() {
|
||||||
|
if [[ "$TERM_PROGRAM" == "WezTerm" ]]; then
|
||||||
|
cat - | wezterm imgcat
|
||||||
|
elif [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
||||||
|
cat - | $(alias imgcat | cut -d "=" -f2-)
|
||||||
|
elif [[ "$TERM" = "xterm-kitty" ]]; then
|
||||||
|
cat - | kitty +kitten icat
|
||||||
|
else
|
||||||
|
echo "No image viewer defined for this terminal" && return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
function displaySVG() {
|
||||||
|
[[ ! -x "$(command -v convert)" ]] && echo "convert not found, install imagemagick" && return 1
|
||||||
|
convert -background none -density 192 - png:- | display
|
||||||
|
}
|
||||||
|
function displayVID() {
|
||||||
|
ffmpeg -loglevel fatal -hide_banner -i "$1" -vf scale=720:-1 -r 10 -f image2pipe -vcodec ppm pipe:1 | \
|
||||||
|
convert -delay 10 -loop 1 - gif:- | \
|
||||||
|
display
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -t 0 ]; then
|
||||||
|
input="$(cat - | base64)"
|
||||||
|
headers="$(echo "$input" | base64 -d | file - --mime-type | cut -d " " -f2-)"
|
||||||
|
|
||||||
|
case $headers in
|
||||||
|
*svg*) echo "$input" | base64 -d | displaySVG ;;
|
||||||
|
*video*) echo "haven't figured this part out yet" && return 1;;
|
||||||
|
*image*) echo "$input" | base64 -d | display ;;
|
||||||
|
*) echo "Unknown file type" && return 1 ;;
|
||||||
|
esac
|
||||||
|
elif [[ "$1" == http* ]]; then
|
||||||
|
case "$(curl -sSLI "$1" | grep -i "^content-type:")" in
|
||||||
|
*svg*) curl -fsSL "$1" | displaySVG ;;
|
||||||
|
*video*) echo "haven't figured this part out yet" && return 1;;
|
||||||
|
*image*) curl -fsSL "$1" | display ;;
|
||||||
|
*) echo "Unknown file type" && return 1 ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
[[ -z "$1" ]] && echo "Usage: icat <file|url>" && return 1
|
||||||
|
[[ ! -f "$1" ]] && echo "File not found: $1" && return 1
|
||||||
|
case "$(file -b --mime-type "$1")" in
|
||||||
|
*svg*) cat "$1" | displaySVG ;;
|
||||||
|
*video*) displayVID $1 ;;
|
||||||
|
*image*) cat "$1" | display ;;
|
||||||
|
*) echo "Unknown file type" && return 1 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# study stream aliases
|
||||||
|
# Requires https://github.com/caarlos0/timer to be installed.
|
||||||
|
|
||||||
|
declare -A pomo_options
|
||||||
|
pomo_options["work"]="25"
|
||||||
|
pomo_options["break"]="5"
|
||||||
|
|
||||||
|
exit_if_ctrl_c() {
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
trap exit_if_ctrl_c SIGINT
|
||||||
|
|
||||||
|
pomodoro() {
|
||||||
|
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
|
||||||
|
val=$1
|
||||||
|
echo $val | lolcat
|
||||||
|
timer ${pomo_options["$val"]}m
|
||||||
|
notify-send "'$val' session done"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
cycle_work_break() {
|
||||||
|
for i in $(seq $1); do
|
||||||
|
pomodoro 'work'
|
||||||
|
pomodoro 'break'
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
cycle_work_break $1
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
OFF=0
|
OFF=0
|
||||||
ON=2
|
ON=2
|
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
flakePath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Sleep well my prince, one day you will be enabled
|
||||||
|
|
||||||
|
# programs.wezterm = {
|
||||||
|
# enable = true;
|
||||||
|
# package = pkgs.nur.repos.nekowinston.wezterm-nightly;
|
||||||
|
# };
|
||||||
|
# xdg.configFile."wezterm/wezterm.lua".enable = false;
|
||||||
|
|
||||||
|
# xdg.configFile."wezterm" = {
|
||||||
|
# source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm";
|
||||||
|
# recursive = true;
|
||||||
|
# };
|
||||||
|
# home.file.".terminfo/w/wezterm".source = wezterm/wezterm_terminfo;
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
wezterm-bar
|
@ -0,0 +1,463 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
# This file hooks up shell integration for wezterm.
|
||||||
|
# It is suitable for zsh and bash.
|
||||||
|
#
|
||||||
|
# Although wezterm is mentioned here, the sequences used are not wezterm
|
||||||
|
# specific and may provide the same functionality for other terminals. Most
|
||||||
|
# terminals are good at ignoring OSC sequences that they don't understand, but
|
||||||
|
# if not there are some bypasses:
|
||||||
|
#
|
||||||
|
# WEZTERM_SHELL_SKIP_ALL - disables all
|
||||||
|
# WEZTERM_SHELL_SKIP_SEMANTIC_ZONES - disables zones
|
||||||
|
# WEZTERM_SHELL_SKIP_CWD - disables OSC 7 cwd setting
|
||||||
|
|
||||||
|
# shellcheck disable=SC2166
|
||||||
|
if [ -z "${BASH_VERSION}" -a -z "${ZSH_NAME}" ] ; then
|
||||||
|
# Only for bash or zsh
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${WEZTERM_SHELL_SKIP_ALL}" = "1" ] ; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $- != *i* ]] ; then
|
||||||
|
# Shell integration is only useful in interactive sessions
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$TERM" in
|
||||||
|
linux | dumb )
|
||||||
|
# Avoid terminals that don't like OSC sequences
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# This function wraps bash-preexec.sh so that it can be included verbatim
|
||||||
|
# in this file, even though it uses `return` to short-circuit in some cases.
|
||||||
|
__wezterm_install_bash_prexec() {
|
||||||
|
|
||||||
|
# bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions.
|
||||||
|
# https://github.com/rcaloras/bash-preexec
|
||||||
|
#
|
||||||
|
# 'preexec' functions are executed before each interactive command is
|
||||||
|
# executed, with the interactive command as its argument. The 'precmd'
|
||||||
|
# function is executed before each prompt is displayed.
|
||||||
|
#
|
||||||
|
# Author: Ryan Caloras (ryan@bashhub.com)
|
||||||
|
# Forked from Original Author: Glyph Lefkowitz
|
||||||
|
#
|
||||||
|
# V0.4.1
|
||||||
|
#
|
||||||
|
|
||||||
|
# General Usage:
|
||||||
|
#
|
||||||
|
# 1. Source this file at the end of your bash profile so as not to interfere
|
||||||
|
# with anything else that's using PROMPT_COMMAND.
|
||||||
|
#
|
||||||
|
# 2. Add any precmd or preexec functions by appending them to their arrays:
|
||||||
|
# e.g.
|
||||||
|
# precmd_functions+=(my_precmd_function)
|
||||||
|
# precmd_functions+=(some_other_precmd_function)
|
||||||
|
#
|
||||||
|
# preexec_functions+=(my_preexec_function)
|
||||||
|
#
|
||||||
|
# 3. Consider changing anything using the DEBUG trap or PROMPT_COMMAND
|
||||||
|
# to use preexec and precmd instead. Preexisting usages will be
|
||||||
|
# preserved, but doing so manually may be less surprising.
|
||||||
|
#
|
||||||
|
# Note: This module requires two Bash features which you must not otherwise be
|
||||||
|
# using: the "DEBUG" trap, and the "PROMPT_COMMAND" variable. If you override
|
||||||
|
# either of these after bash-preexec has been installed it will most likely break.
|
||||||
|
|
||||||
|
# Make sure this is bash that's running and return otherwise.
|
||||||
|
if [[ -z "${BASH_VERSION:-}" ]]; then
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Avoid duplicate inclusion
|
||||||
|
if [[ "${__bp_imported:-}" == "defined" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
__bp_imported="defined"
|
||||||
|
|
||||||
|
# Should be available to each precmd and preexec
|
||||||
|
# functions, should they want it. $? and $_ are available as $? and $_, but
|
||||||
|
# $PIPESTATUS is available only in a copy, $BP_PIPESTATUS.
|
||||||
|
# TODO: Figure out how to restore PIPESTATUS before each precmd or preexec
|
||||||
|
# function.
|
||||||
|
__bp_last_ret_value="$?"
|
||||||
|
BP_PIPESTATUS=("${PIPESTATUS[@]}")
|
||||||
|
__bp_last_argument_prev_command="$_"
|
||||||
|
|
||||||
|
__bp_inside_precmd=0
|
||||||
|
__bp_inside_preexec=0
|
||||||
|
|
||||||
|
# Initial PROMPT_COMMAND string that is removed from PROMPT_COMMAND post __bp_install
|
||||||
|
__bp_install_string=$'__bp_trap_string="$(trap -p DEBUG)"\ntrap - DEBUG\n__bp_install'
|
||||||
|
|
||||||
|
# Fails if any of the given variables are readonly
|
||||||
|
# Reference https://stackoverflow.com/a/4441178
|
||||||
|
__bp_require_not_readonly() {
|
||||||
|
local var
|
||||||
|
for var; do
|
||||||
|
if ! ( unset "$var" 2> /dev/null ); then
|
||||||
|
echo "bash-preexec requires write access to ${var}" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove ignorespace and or replace ignoreboth from HISTCONTROL
|
||||||
|
# so we can accurately invoke preexec with a command from our
|
||||||
|
# history even if it starts with a space.
|
||||||
|
__bp_adjust_histcontrol() {
|
||||||
|
local histcontrol
|
||||||
|
histcontrol="${HISTCONTROL//ignorespace}"
|
||||||
|
# Replace ignoreboth with ignoredups
|
||||||
|
if [[ "$histcontrol" == *"ignoreboth"* ]]; then
|
||||||
|
histcontrol="ignoredups:${histcontrol//ignoreboth}"
|
||||||
|
fi;
|
||||||
|
export HISTCONTROL="$histcontrol"
|
||||||
|
}
|
||||||
|
|
||||||
|
# This variable describes whether we are currently in "interactive mode";
|
||||||
|
# i.e. whether this shell has just executed a prompt and is waiting for user
|
||||||
|
# input. It documents whether the current command invoked by the trace hook is
|
||||||
|
# run interactively by the user; it's set immediately after the prompt hook,
|
||||||
|
# and unset as soon as the trace hook is run.
|
||||||
|
__bp_preexec_interactive_mode=""
|
||||||
|
|
||||||
|
# Trims leading and trailing whitespace from $2 and writes it to the variable
|
||||||
|
# name passed as $1
|
||||||
|
__bp_trim_whitespace() {
|
||||||
|
local var=${1:?} text=${2:-}
|
||||||
|
text="${text#"${text%%[![:space:]]*}"}" # remove leading whitespace characters
|
||||||
|
text="${text%"${text##*[![:space:]]}"}" # remove trailing whitespace characters
|
||||||
|
printf -v "$var" '%s' "$text"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Trims whitespace and removes any leading or trailing semicolons from $2 and
|
||||||
|
# writes the resulting string to the variable name passed as $1. Used for
|
||||||
|
# manipulating substrings in PROMPT_COMMAND
|
||||||
|
__bp_sanitize_string() {
|
||||||
|
local var=${1:?} text=${2:-} sanitized
|
||||||
|
__bp_trim_whitespace sanitized "$text"
|
||||||
|
sanitized=${sanitized%;}
|
||||||
|
sanitized=${sanitized#;}
|
||||||
|
__bp_trim_whitespace sanitized "$sanitized"
|
||||||
|
printf -v "$var" '%s' "$sanitized"
|
||||||
|
}
|
||||||
|
|
||||||
|
# This function is installed as part of the PROMPT_COMMAND;
|
||||||
|
# It sets a variable to indicate that the prompt was just displayed,
|
||||||
|
# to allow the DEBUG trap to know that the next command is likely interactive.
|
||||||
|
__bp_interactive_mode() {
|
||||||
|
__bp_preexec_interactive_mode="on";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# This function is installed as part of the PROMPT_COMMAND.
|
||||||
|
# It will invoke any functions defined in the precmd_functions array.
|
||||||
|
__bp_precmd_invoke_cmd() {
|
||||||
|
# Save the returned value from our last command, and from each process in
|
||||||
|
# its pipeline. Note: this MUST be the first thing done in this function.
|
||||||
|
__bp_last_ret_value="$?" BP_PIPESTATUS=("${PIPESTATUS[@]}")
|
||||||
|
|
||||||
|
# Don't invoke precmds if we are inside an execution of an "original
|
||||||
|
# prompt command" by another precmd execution loop. This avoids infinite
|
||||||
|
# recursion.
|
||||||
|
if (( __bp_inside_precmd > 0 )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
local __bp_inside_precmd=1
|
||||||
|
|
||||||
|
# Invoke every function defined in our function array.
|
||||||
|
local precmd_function
|
||||||
|
for precmd_function in "${precmd_functions[@]}"; do
|
||||||
|
|
||||||
|
# Only execute this function if it actually exists.
|
||||||
|
# Test existence of functions with: declare -[Ff]
|
||||||
|
if type -t "$precmd_function" 1>/dev/null; then
|
||||||
|
__bp_set_ret_value "$__bp_last_ret_value" "$__bp_last_argument_prev_command"
|
||||||
|
# Quote our function invocation to prevent issues with IFS
|
||||||
|
"$precmd_function"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return $__bp_last_ret_value
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sets a return value in $?. We may want to get access to the $? variable in our
|
||||||
|
# precmd functions. This is available for instance in zsh. We can simulate it in bash
|
||||||
|
# by setting the value here.
|
||||||
|
__bp_set_ret_value() {
|
||||||
|
return ${1:-}
|
||||||
|
}
|
||||||
|
|
||||||
|
__bp_in_prompt_command() {
|
||||||
|
|
||||||
|
local prompt_command_array
|
||||||
|
IFS=$'\n;' read -rd '' -a prompt_command_array <<< "$PROMPT_COMMAND"
|
||||||
|
|
||||||
|
local trimmed_arg
|
||||||
|
__bp_trim_whitespace trimmed_arg "${1:-}"
|
||||||
|
|
||||||
|
local command trimmed_command
|
||||||
|
for command in "${prompt_command_array[@]:-}"; do
|
||||||
|
__bp_trim_whitespace trimmed_command "$command"
|
||||||
|
if [[ "$trimmed_command" == "$trimmed_arg" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# This function is installed as the DEBUG trap. It is invoked before each
|
||||||
|
# interactive prompt display. Its purpose is to inspect the current
|
||||||
|
# environment to attempt to detect if the current command is being invoked
|
||||||
|
# interactively, and invoke 'preexec' if so.
|
||||||
|
__bp_preexec_invoke_exec() {
|
||||||
|
|
||||||
|
# Save the contents of $_ so that it can be restored later on.
|
||||||
|
# https://stackoverflow.com/questions/40944532/bash-preserve-in-a-debug-trap#40944702
|
||||||
|
__bp_last_argument_prev_command="${1:-}"
|
||||||
|
# Don't invoke preexecs if we are inside of another preexec.
|
||||||
|
if (( __bp_inside_preexec > 0 )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
local __bp_inside_preexec=1
|
||||||
|
|
||||||
|
# Checks if the file descriptor is not standard out (i.e. '1')
|
||||||
|
# __bp_delay_install checks if we're in test. Needed for bats to run.
|
||||||
|
# Prevents preexec from being invoked for functions in PS1
|
||||||
|
if [[ ! -t 1 && -z "${__bp_delay_install:-}" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${COMP_LINE:-}" ]]; then
|
||||||
|
# We're in the middle of a completer. This obviously can't be
|
||||||
|
# an interactively issued command.
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [[ -z "${__bp_preexec_interactive_mode:-}" ]]; then
|
||||||
|
# We're doing something related to displaying the prompt. Let the
|
||||||
|
# prompt set the title instead of me.
|
||||||
|
return
|
||||||
|
else
|
||||||
|
# If we're in a subshell, then the prompt won't be re-displayed to put
|
||||||
|
# us back into interactive mode, so let's not set the variable back.
|
||||||
|
# In other words, if you have a subshell like
|
||||||
|
# (sleep 1; sleep 2)
|
||||||
|
# You want to see the 'sleep 2' as a set_command_title as well.
|
||||||
|
if [[ 0 -eq "${BASH_SUBSHELL:-}" ]]; then
|
||||||
|
__bp_preexec_interactive_mode=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if __bp_in_prompt_command "${BASH_COMMAND:-}"; then
|
||||||
|
# If we're executing something inside our prompt_command then we don't
|
||||||
|
# want to call preexec. Bash prior to 3.1 can't detect this at all :/
|
||||||
|
__bp_preexec_interactive_mode=""
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local this_command
|
||||||
|
this_command=$(
|
||||||
|
export LC_ALL=C
|
||||||
|
HISTTIMEFORMAT= builtin history 1 | sed '1 s/^ *[0-9][0-9]*[* ] //'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Sanity check to make sure we have something to invoke our function with.
|
||||||
|
if [[ -z "$this_command" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Invoke every function defined in our function array.
|
||||||
|
local preexec_function
|
||||||
|
local preexec_function_ret_value
|
||||||
|
local preexec_ret_value=0
|
||||||
|
for preexec_function in "${preexec_functions[@]:-}"; do
|
||||||
|
|
||||||
|
# Only execute each function if it actually exists.
|
||||||
|
# Test existence of function with: declare -[fF]
|
||||||
|
if type -t "$preexec_function" 1>/dev/null; then
|
||||||
|
__bp_set_ret_value ${__bp_last_ret_value:-}
|
||||||
|
# Quote our function invocation to prevent issues with IFS
|
||||||
|
"$preexec_function" "$this_command"
|
||||||
|
preexec_function_ret_value="$?"
|
||||||
|
if [[ "$preexec_function_ret_value" != 0 ]]; then
|
||||||
|
preexec_ret_value="$preexec_function_ret_value"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Restore the last argument of the last executed command, and set the return
|
||||||
|
# value of the DEBUG trap to be the return code of the last preexec function
|
||||||
|
# to return an error.
|
||||||
|
# If `extdebug` is enabled a non-zero return value from any preexec function
|
||||||
|
# will cause the user's command not to execute.
|
||||||
|
# Run `shopt -s extdebug` to enable
|
||||||
|
__bp_set_ret_value "$preexec_ret_value" "$__bp_last_argument_prev_command"
|
||||||
|
}
|
||||||
|
|
||||||
|
__bp_install() {
|
||||||
|
# Exit if we already have this installed.
|
||||||
|
if [[ "${PROMPT_COMMAND:-}" == *"__bp_precmd_invoke_cmd"* ]]; then
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap '__bp_preexec_invoke_exec "$_"' DEBUG
|
||||||
|
|
||||||
|
# Preserve any prior DEBUG trap as a preexec function
|
||||||
|
local prior_trap=$(sed "s/[^']*'\(.*\)'[^']*/\1/" <<<"${__bp_trap_string:-}")
|
||||||
|
unset __bp_trap_string
|
||||||
|
if [[ -n "$prior_trap" ]]; then
|
||||||
|
eval '__bp_original_debug_trap() {
|
||||||
|
'"$prior_trap"'
|
||||||
|
}'
|
||||||
|
preexec_functions+=(__bp_original_debug_trap)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Adjust our HISTCONTROL Variable if needed.
|
||||||
|
__bp_adjust_histcontrol
|
||||||
|
|
||||||
|
# Issue #25. Setting debug trap for subshells causes sessions to exit for
|
||||||
|
# backgrounded subshell commands (e.g. (pwd)& ). Believe this is a bug in Bash.
|
||||||
|
#
|
||||||
|
# Disabling this by default. It can be enabled by setting this variable.
|
||||||
|
if [[ -n "${__bp_enable_subshells:-}" ]]; then
|
||||||
|
|
||||||
|
# Set so debug trap will work be invoked in subshells.
|
||||||
|
set -o functrace > /dev/null 2>&1
|
||||||
|
shopt -s extdebug > /dev/null 2>&1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
local existing_prompt_command
|
||||||
|
# Remove setting our trap install string and sanitize the existing prompt command string
|
||||||
|
existing_prompt_command="${PROMPT_COMMAND//$__bp_install_string[;$'\n']}" # Edge case of appending to PROMPT_COMMAND
|
||||||
|
existing_prompt_command="${existing_prompt_command//$__bp_install_string}"
|
||||||
|
__bp_sanitize_string existing_prompt_command "$existing_prompt_command"
|
||||||
|
|
||||||
|
# Install our hooks in PROMPT_COMMAND to allow our trap to know when we've
|
||||||
|
# actually entered something.
|
||||||
|
PROMPT_COMMAND=$'__bp_precmd_invoke_cmd\n'
|
||||||
|
if [[ -n "$existing_prompt_command" ]]; then
|
||||||
|
PROMPT_COMMAND+=${existing_prompt_command}$'\n'
|
||||||
|
fi;
|
||||||
|
PROMPT_COMMAND+='__bp_interactive_mode'
|
||||||
|
|
||||||
|
# Add two functions to our arrays for convenience
|
||||||
|
# of definition.
|
||||||
|
precmd_functions+=(precmd)
|
||||||
|
preexec_functions+=(preexec)
|
||||||
|
|
||||||
|
# Invoke our two functions manually that were added to $PROMPT_COMMAND
|
||||||
|
__bp_precmd_invoke_cmd
|
||||||
|
__bp_interactive_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sets an installation string as part of our PROMPT_COMMAND to install
|
||||||
|
# after our session has started. This allows bash-preexec to be included
|
||||||
|
# at any point in our bash profile.
|
||||||
|
__bp_install_after_session_init() {
|
||||||
|
# bash-preexec needs to modify these variables in order to work correctly
|
||||||
|
# if it can't, just stop the installation
|
||||||
|
__bp_require_not_readonly PROMPT_COMMAND HISTCONTROL HISTTIMEFORMAT || return
|
||||||
|
|
||||||
|
local sanitized_prompt_command
|
||||||
|
__bp_sanitize_string sanitized_prompt_command "$PROMPT_COMMAND"
|
||||||
|
if [[ -n "$sanitized_prompt_command" ]]; then
|
||||||
|
PROMPT_COMMAND=${sanitized_prompt_command}$'\n'
|
||||||
|
fi;
|
||||||
|
PROMPT_COMMAND+=${__bp_install_string}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run our install so long as we're not delaying it.
|
||||||
|
if [[ -z "${__bp_delay_install:-}" ]]; then
|
||||||
|
__bp_install_after_session_init
|
||||||
|
fi;
|
||||||
|
|
||||||
|
} # end of __wezterm_install_bash_prexec
|
||||||
|
|
||||||
|
# blesh provides it's own preexec mechanism which is recommended over bash-preexec
|
||||||
|
# See https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A71-Introduction#user-content-fn-blehook for more details
|
||||||
|
if [[ ! -n "$BLE_VERSION" ]]; then
|
||||||
|
__wezterm_install_bash_prexec
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This function emits an OSC 7 sequence to inform the terminal
|
||||||
|
# of the current working directory. It prefers to use a helper
|
||||||
|
# command provided by wezterm if wezterm is installed, but falls
|
||||||
|
# back to a simple printf command otherwise.
|
||||||
|
__wezterm_osc7() {
|
||||||
|
if hash wezterm 2>/dev/null ; then
|
||||||
|
wezterm set-working-directory 2>/dev/null && return 0
|
||||||
|
# If the command failed (perhaps the installed wezterm
|
||||||
|
# is too old?) then fall back to the simple version below.
|
||||||
|
fi
|
||||||
|
printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "${PWD}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# The semantic precmd and prexec functions generate semantic
|
||||||
|
# zones, marking up the prompt, the user input and the command
|
||||||
|
# output so that the terminal can better reason about the display.
|
||||||
|
__wezterm_semantic_precmd_executing=""
|
||||||
|
__wezterm_semantic_precmd() {
|
||||||
|
local ret="$?"
|
||||||
|
if [[ "$__wezterm_semantic_precmd_executing" != "0" ]] ; then
|
||||||
|
__wezterm_save_ps1="$PS1"
|
||||||
|
__wezterm_save_ps2="$PS2"
|
||||||
|
# Markup the left and right prompts so that the terminal
|
||||||
|
# knows that they are semantically prompt output.
|
||||||
|
if [[ -n "$ZSH_NAME" ]] ; then
|
||||||
|
PS1=$'%{\e]133;P;k=i\a%}'$PS1$'%{\e]133;B\a%}'
|
||||||
|
PS2=$'%{\e]133;P;k=s\a%}'$PS2$'%{\e]133;B\a%}'
|
||||||
|
else
|
||||||
|
PS1='\[\e]133;P;k=i\a\]'$PS1'\[\e]133;B\a\]'
|
||||||
|
PS2='\[\e]133;P;k=s\a\]'$PS2'\[\e]133;B\a\]'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$__wezterm_semantic_precmd_executing" != "" ]] ; then
|
||||||
|
# Report last command status
|
||||||
|
printf "\033]133;D;%s;aid=%s\007" "$ret" "$$"
|
||||||
|
fi
|
||||||
|
# Fresh line and start the prompt
|
||||||
|
printf "\033]133;A;cl=m;aid=%s\007" "$$"
|
||||||
|
__wezterm_semantic_precmd_executing=0
|
||||||
|
}
|
||||||
|
|
||||||
|
function __wezterm_semantic_preexec() {
|
||||||
|
# Restore the original PS1/PS2
|
||||||
|
PS1="$__wezterm_save_ps1"
|
||||||
|
PS2="$__wezterm_save_ps2"
|
||||||
|
# Indicate that the command output begins here
|
||||||
|
printf "\033]133;C;\007"
|
||||||
|
__wezterm_semantic_precmd_executing=1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Register the various functions; take care to perform osc7 after
|
||||||
|
# the semantic zones as we don't want to perturb the last command
|
||||||
|
# status before we've had a chance to report it to the terminal
|
||||||
|
if [[ -z "${WEZTERM_SHELL_SKIP_SEMANTIC_ZONES}" ]]; then
|
||||||
|
if [[ -n "$BLE_VERSION" ]]; then
|
||||||
|
blehook PRECMD+=__wezterm_semantic_precmd
|
||||||
|
blehook PREEXEC+=__wezterm_semantic_preexec
|
||||||
|
else
|
||||||
|
precmd_functions+=(__wezterm_semantic_precmd)
|
||||||
|
preexec_functions+=(__wezterm_semantic_preexec)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${WEZTERM_SHELL_SKIP_CWD}" ]] ; then
|
||||||
|
if [[ -n "$BLE_VERSION" ]]; then
|
||||||
|
blehook PRECMD+=__wezterm_osc7
|
||||||
|
else
|
||||||
|
precmd_functions+=(__wezterm_osc7)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
true
|
@ -0,0 +1,89 @@
|
|||||||
|
# This is Wez's term definition for wezterm.
|
||||||
|
# It was reconstructed via infocmp from file: /lib/terminfo/x/xterm-256color
|
||||||
|
# and then has some additions in the top few lines (until the line starting
|
||||||
|
# with am).
|
||||||
|
# Tc: true color boolean for tmux
|
||||||
|
# sitm/ritm: italics
|
||||||
|
# Ms modifies the selection/clipboard. Its parameters are
|
||||||
|
# p1 = the storage unit (clipboard, selection or cut buffer)
|
||||||
|
# p2 = the base64-encoded clipboard content.
|
||||||
|
#
|
||||||
|
# Ss is used to set the cursor style as described by the DECSCUSR
|
||||||
|
# function to a block or underline.
|
||||||
|
# Se resets the cursor style to the terminal power-on default.
|
||||||
|
# Smulx defines kitty style underline escape sequence support
|
||||||
|
#
|
||||||
|
# hs, dsl, fsl, tsl are used by nvim to amend the "status line".
|
||||||
|
# These are not normally present for xterm and have assumed values
|
||||||
|
# when TERM==xterm. When using this terminfo file that assumption is not
|
||||||
|
# true and that functionality is broken.
|
||||||
|
# We follow the foot's terminfo settings for these, based on
|
||||||
|
# https://codeberg.org/dnkl/foot/pulls/243/files
|
||||||
|
# although we use OSC 0 for the title rather than OSC 2.
|
||||||
|
# https://github.com/neovim/neovim/issues/20706
|
||||||
|
# https://github.com/wez/wezterm/issues/2635
|
||||||
|
wezterm|Wez's terminal emulator,
|
||||||
|
Tc,
|
||||||
|
hs,
|
||||||
|
sitm=\E[3m, ritm=\E[23m,
|
||||||
|
Cr=\E]112\007, Cs=\E]12;%p1%s\007, Ms=\E]52;%p1%s;%p2%s\007, Se=\E[2\sq,
|
||||||
|
Ss=\E[%p1%d\sq,
|
||||||
|
Smulx=\E[4:%p1%dm,
|
||||||
|
Sync=\E[?2026%?%p1%{1}%-%tl%eh,
|
||||||
|
Setulc=\E[58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m,
|
||||||
|
Smol=\E[53m,
|
||||||
|
am, bce, ccc, km, mc5i, mir, msgr, npc, xenl,
|
||||||
|
colors#0x100, cols#80, it#8, lines#24, pairs#0x7fff,
|
||||||
|
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||||
|
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
|
||||||
|
clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=\r,
|
||||||
|
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
|
||||||
|
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
|
||||||
|
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
|
||||||
|
cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
|
||||||
|
dl=\E[%p1%dM, dl1=\E[M, dsl=\E]2;\E\\,
|
||||||
|
ech=\E[%p1%dX, ed=\E[J, el=\E[K,
|
||||||
|
el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, fsl=\E\\, home=\E[H,
|
||||||
|
hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
|
||||||
|
il=\E[%p1%dL, il1=\E[L, ind=\n, indn=\E[%p1%dS,
|
||||||
|
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
|
||||||
|
invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~,
|
||||||
|
kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D,
|
||||||
|
kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=^?,
|
||||||
|
kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
|
||||||
|
kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
|
||||||
|
kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q,
|
||||||
|
kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
|
||||||
|
kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
|
||||||
|
kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~,
|
||||||
|
kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S,
|
||||||
|
kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~,
|
||||||
|
kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~,
|
||||||
|
kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q,
|
||||||
|
kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~,
|
||||||
|
kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~,
|
||||||
|
kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~,
|
||||||
|
kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q,
|
||||||
|
kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
|
||||||
|
kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
|
||||||
|
kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
|
||||||
|
kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
|
||||||
|
kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~,
|
||||||
|
kind=\E[1;2B, knp=\E[6~, kpp=\E[5~,
|
||||||
|
kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
|
||||||
|
memu=\Em, oc=\E]104\007, op=\E[39;49m, rc=\E8,
|
||||||
|
rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, ri=\EM,
|
||||||
|
rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B, rmam=\E[?7l,
|
||||||
|
rmcup=\E[?1049l\E[23;0;0t, rmir=\E[4l, rmkx=\E[?1l\E>,
|
||||||
|
rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m, rmxx=\E[29m,
|
||||||
|
rs1=\Ec\E]104\007, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
|
||||||
|
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
|
||||||
|
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
|
||||||
|
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
|
||||||
|
sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
|
||||||
|
smcup=\E[?1049h\E[22;0;0t, smir=\E[4h, smkx=\E[?1h\E=,
|
||||||
|
smm=\E[?1034h, smso=\E[7m, smul=\E[4m, smxx=\E[9m,
|
||||||
|
tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c,
|
||||||
|
u9=\E[c, vpa=\E[%i%p1%dd, XM=\E[?1003;1006%?%p1%{1}%=%th%el%;,
|
||||||
|
kmous=\E[<, XM=\E[?1006;1000%?%p1%{1}%=%th%el%;,
|
||||||
|
xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;,
|
@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableAutosuggestions = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
# Idk why the highlighting doesn't work properly now
|
||||||
|
# https://github.com/zsh-users/zsh-syntax-highlighting/issues/922
|
||||||
|
# source /nix/store/vzwfgm1a53ihs5x0vwzqd9rbs04vsmgk-zsh-syntax-highlighting-0.7.1/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
enableSyntaxHighlighting = false;
|
||||||
|
|
||||||
|
envExtra = ''
|
||||||
|
export ZVM_INIT_MODE=sourcing
|
||||||
|
'';
|
||||||
|
initExtra = ''
|
||||||
|
# WezTerm
|
||||||
|
if [[ "$TERM_PROGRAM" == "WezTerm" ]]; then
|
||||||
|
TERM=wezterm
|
||||||
|
source $HOME/.config/wezterm/wezterm.sh
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
dotDir = ".config/zsh";
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"colored-man-pages"
|
||||||
|
"colorize"
|
||||||
|
"docker"
|
||||||
|
"docker-compose"
|
||||||
|
"git"
|
||||||
|
"kubectl"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
plugins = let
|
||||||
|
themepkg = pkgs.fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "zsh-syntax-highlighting";
|
||||||
|
rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
|
||||||
|
sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
|
||||||
|
};
|
||||||
|
in [
|
||||||
|
{
|
||||||
|
name = "zsh-vi-mode";
|
||||||
|
src = pkgs.zsh-vi-mode;
|
||||||
|
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-nix-shell";
|
||||||
|
src = pkgs.zsh-nix-shell;
|
||||||
|
file = "share/zsh-nix-shell/nix-shell.plugin.zsh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "nix-zsh-completions";
|
||||||
|
src = pkgs.nix-zsh-completions;
|
||||||
|
file = "share/nix-zsh-completions/nix-zsh-completions.plugin.zsh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ctp-zsh-syntax-highlighting";
|
||||||
|
src = themepkg;
|
||||||
|
file = themepkg + "/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
history = {
|
||||||
|
path = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/history";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
flakePath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# ./apps/wezterm.nix
|
||||||
|
# ./apps/zsh.nix
|
||||||
|
./apps/fonts.nix
|
||||||
|
./apps/git.nix
|
||||||
|
./apps/fish.nix
|
||||||
|
./apps/k8s.nix
|
||||||
|
./apps/nap.nix
|
||||||
|
./apps/go.nix
|
||||||
|
./apps/deno.nix
|
||||||
|
./apps/rust.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
nix.package = pkgs.nix;
|
||||||
|
nix.settings = {
|
||||||
|
experimental-features = "nix-command flakes";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.username = "hammy";
|
||||||
|
home.homeDirectory = "/home/hammy";
|
||||||
|
home.stateVersion = "22.11";
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
imagemagick
|
||||||
|
alejandra
|
||||||
|
fd
|
||||||
|
vivid
|
||||||
|
];
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
SUDO_EDITOR = "nvim";
|
||||||
|
TERMINAL = "wezterm-gui";
|
||||||
|
LIBVA_DRIVER_NAME = "iHD";
|
||||||
|
LS_COLORS = "$(vivid generate catppuccin-mocha)";
|
||||||
|
JAVA_HOME = "$SDKMAN_DIR/candidates/java/current";
|
||||||
|
GRAALVM_HOME = "$SDKMAN_DIR/candidates/java/22.3.r17-grl";
|
||||||
|
};
|
||||||
|
home.sessionPath = [
|
||||||
|
"${config.xdg.dataHome}/nvim/mason/bin"
|
||||||
|
"${config.xdg.dataHome}/JetBrains/Toolbox/scripts"
|
||||||
|
"${config.xdg.dataHome}/scripts"
|
||||||
|
];
|
||||||
|
home.shellAliases = {
|
||||||
|
magit = "nvim '+Neogit kind=replace'";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."ideavim/ideavimrc".source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/ideavim/ideavimrc";
|
||||||
|
xdg.mime.enable = true;
|
||||||
|
# turn off if on nixos (you have bigger problems than that if you get to this point)
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
}
|
@ -1,714 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<profiles version="13">
|
|
||||||
<profile kind="CodeFormatterProfile" name="GoogleStyle" version="13">
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries"
|
|
||||||
value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent"
|
|
||||||
value="16|-1|16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments" value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_comment_inline_tags" value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter"
|
|
||||||
value="1040" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer"
|
|
||||||
value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent"
|
|
||||||
value="1585|-1|1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent"
|
|
||||||
value="16|-1|16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent"
|
|
||||||
value="16|4|80" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent"
|
|
||||||
value="16|4|48" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent"
|
|
||||||
value="16|4|49" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation"
|
|
||||||
value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent"
|
|
||||||
value="16|4|48" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation"
|
|
||||||
value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="0" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent"
|
|
||||||
value="16|5|48" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description"
|
|
||||||
value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<!-- <setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100" /> -->
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent"
|
|
||||||
value="16|4|48" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration"
|
|
||||||
value="0" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package"
|
|
||||||
value="1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_field_declaration" value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments"
|
|
||||||
value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments" value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch"
|
|
||||||
value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph"
|
|
||||||
value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method"
|
|
||||||
value="1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column"
|
|
||||||
value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch"
|
|
||||||
value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent"
|
|
||||||
value="16|5|80" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment"
|
|
||||||
value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent"
|
|
||||||
value="1040|-1|1040" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent"
|
|
||||||
value="1585|-1|1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.force_if_else_statement_brace" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="3" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation" value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression"
|
|
||||||
value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent"
|
|
||||||
value="16|-1|16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer"
|
|
||||||
value="2" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class" value="20" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent"
|
|
||||||
value="1585|-1|1585" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent"
|
|
||||||
value="1585|-1|1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent"
|
|
||||||
value="16|5|80" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent"
|
|
||||||
value="16|-1|16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="0" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body"
|
|
||||||
value="0" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header"
|
|
||||||
value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header"
|
|
||||||
value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases"
|
|
||||||
value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="1585" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent"
|
|
||||||
value="16|5|80" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration"
|
|
||||||
value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation"
|
|
||||||
value="16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header"
|
|
||||||
value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent"
|
|
||||||
value="16|4|48" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent"
|
|
||||||
value="1585|-1|1585" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration"
|
|
||||||
value="end_of_line" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent"
|
|
||||||
value="16|-1|16" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation" value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable"
|
|
||||||
value="1585" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent"
|
|
||||||
value="16|5|80" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent"
|
|
||||||
value="16|-1|16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent"
|
|
||||||
value="16|5|80" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent"
|
|
||||||
value="16|5|80" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries"
|
|
||||||
value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations"
|
|
||||||
value="insert" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header"
|
|
||||||
value="true" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for"
|
|
||||||
value="insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_for_statement" value="16" />
|
|
||||||
<setting
|
|
||||||
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments"
|
|
||||||
value="do not insert" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column"
|
|
||||||
value="false" />
|
|
||||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false" />
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
Loading…
Reference in New Issue