18 files changed,
302 insertions(+),
26 deletions(-)
jump to
A
config/lvim/config.lua
@@ -0,0 +1,42 @@
+lvim.leader = "space" +lvim.format_on_save = false +lvim.lint_on_save = false +lvim.colorscheme = "onedarker" + +-- Terminal +lvim.builtin.terminal.active = true +lvim.builtin.autopairs.active = true + +-- GitSigns +lvim.builtin.gitsigns.opts.current_line_blame = true +lvim.builtin.gitsigns.opts.current_line_blame_opts = { virt_text = true, virt_text_pos = "eol", delay = 200 } + +-- TreeSitter +lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua", "java" } +lvim.builtin.treesitter.indent.disable = { "clojure", "java", "python" } + +-- Telescope +lvim.builtin.telescope.defaults.layout_config.prompt_position = "top" +lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "env" } + +-- Mappings +lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>" +lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>" +lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" } +lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" } + +local fmt = string.format +for i = 1, 9 do + lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i) +end + +-- Plugins +lvim.plugins = { + { "tpope/vim-surround", keys = { "c", "y", "d" } }, + { "andymass/vim-matchup", keys = { "%" } }, + { "tzachar/cmp-tabnine", run = "./install.sh", event = "InsertEnter" }, + { "folke/trouble.nvim", cmd = { "TroubleToggle" } }, + { "folke/todo-comments.nvim", event = "BufRead" }, + { "mfussenegger/nvim-jdtls", ft = { "java" } }, + { "npxbr/glow.nvim", ft = { "markdown" }, cmd = { "Glow" } }, +}
A
config/lvim/ftplugin/go.lua
@@ -0,0 +1,5 @@
+lvim.format_on_save = true +lvim.lang.go.formatters = { + { exe = "gofmt" }, + { exe = "goimports" }, +}
A
config/lvim/ftplugin/java.lua
@@ -0,0 +1,22 @@
+if vim.fn.has("mac") == 1 then + WORKSPACE_PATH = "/Users/" .. USER .. "/workspace/" +elseif vim.fn.has("unix") == 1 then + WORKSPACE_PATH = "/home/" .. USER .. "/workspace/" +else + print("Unsupported system") +end + +JAVA_LS_EXECUTABLE = os.getenv("HOME") .. "/.local/share/lunarvim/lvim/utils/bin/jdtls" + +require("jdtls").start_or_attach({ + on_attach = require("lsp").common_on_attach, + cmd = { JAVA_LS_EXECUTABLE, WORKSPACE_PATH .. vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t") }, +}) + +vim.api.nvim_set_keymap("n", "<leader>la", ":lua require('jdtls').code_action()<CR>", { noremap = true, silent = true }) + +vim.cmd("command! -buffer JdtCompile lua require('jdtls').compile()") +vim.cmd("command! -buffer JdtUpdateConfig lua require('jdtls').update_project_config()") +vim.cmd("command! -buffer JdtJol lua require('jdtls').jol()") +vim.cmd("command! -buffer JdtBytecode lua require('jdtls').javap()") +vim.cmd("command! -buffer JdtJshell lua require('jdtls').jshell()")
A
config/lvim/ftplugin/javascript.lua
@@ -0,0 +1,24 @@
+lvim.lang.javascript.formatters = { + -- { exe = "eslint_d" }, + { exe = "prettierd" }, +} + +lvim.lang.javascript.linters = { + { exe = "eslint_d" }, +} + +lvim.lang.javascript.lsp.setup.handlers = { + ["textDocument/publishDiagnostics"] = function(_, _, p, client_id, _, config) + if p.diagnostics ~= nil then + local i = 1 + while i <= #p.diagnostics do + if p.diagnostics[i].code == 80001 then + table.remove(p.diagnostics, i) + else + i = i + 1 + end + end + end + vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, client_id, _, config) + end, +}
A
config/lvim/ftplugin/lua.lua
@@ -0,0 +1,9 @@
+lvim.format_on_save = true +lvim.lang.lua.formatters = { + { exe = "stylua" }, +} + +lvim.lang.lua.linters = { + -- { exe = "luacheck" }, + -- { exe = "selene" }, +}
A
config/lvim/ftplugin/python.lua
@@ -0,0 +1,9 @@
+lvim.format_on_save = true +lvim.lang.python.formatters = { + { exe = "black" }, + { exe = "isort" }, +} + +lvim.lang.python.linters = { + { exe = "flake8" }, +}
A
config/lvim/ftplugin/typescript.lua
@@ -0,0 +1,8 @@
+lvim.lang.typescript.formatters = { + -- { exe = "eslint_d" }, + { exe = "prettierd" }, +} + +lvim.lang.typescript.linters = { + { exe = "eslint_d" }, +}
A
config/lvim/lsp-settings/jsonls.json
@@ -0,0 +1,77 @@
+{ + "json.schemas": [ + { + "fileMatch": [ + "package.json" + ], + "url": "https://json.schemastore.org/package.json" + }, + { + "fileMatch": [ + "tsconfig.json", + "tsconfig.*.json" + ], + "url": "http://json.schemastore.org/tsconfig" + }, + { + "fileMatch": [ + "lerna.json" + ], + "url": "http://json.schemastore.org/lerna" + }, + { + "fileMatch": [ + ".babelrc.json", + ".babelrc", + "babel.config.json" + ], + "url": "http://json.schemastore.org/lerna" + }, + { + "fileMatch": [ + ".eslintrc.json", + ".eslintrc" + ], + "url": "http://json.schemastore.org/eslintrc" + }, + { + "fileMatch": [ + "bsconfig.json" + ], + "url": "https://bucklescript.github.io/bucklescript/docson/build-schema.json" + }, + { + "fileMatch": [ + ".prettierrc", + ".prettierrc.json", + "prettier.config.json" + ], + "url": "http://json.schemastore.org/prettierrc" + }, + { + "fileMatch": [ + "now.json" + ], + "url": "http://json.schemastore.org/now" + }, + { + "fileMatch": [ + "openapi.json", + "swagger.json" + ], + "url": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" + }, + { + "fileMatch": [ + "nest-cli.json" + ], + "url": "https://json.schemastore.org/nest-cli.json" + }, + { + "fileMatch": [ + "nodemon.json" + ], + "url": "https://json.schemastore.org/nodemon.json" + } + ] +}
A
config/lvim/lsp-settings/pyright.json
@@ -0,0 +1,3 @@
+{ + "python.analysis.typeCheckingMode": "off" +}
A
config/lvim/lsp-settings/yamlls.json
@@ -0,0 +1,36 @@
+{ + "yaml.schemas": { + "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": [ + "docker-compose.yml", + "docker-compose.yaml" + ], + "https://json.schemastore.org/ansible-playbook.json": [ + "*/playbook/**/*.yml", + "*/playbooks/**/*.yml", + "*/playbook/**/*.yaml", + "*/playbooks/**/*.yaml" + ], + "https://json.schemastore.org/yamllint.json": [ + ".yamllint", + ".yamllint.yml", + ".yamllint.yaml" + ], + "https://yarnpkg.com/configuration/yarnrc.json": [ + ".yarnrc", + ".yarnrc.yml" + ], + "https://json.schemastore.org/github-action.json": [ + "*/.github/workflows/**/*.yml", + "*/.github/workflows/**/*.yaml" + ], + "https://json.schemastore.org/gitlab-ci.json": [ + ".gitlab-ci.yml" + ], + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": [ + "openapi.yaml", + "openapi.yml", + "swagger.yml", + "swagger.yal" + ] + } +}
A
config/lvim/lua/u/conjure.lua
@@ -0,0 +1,7 @@
+local M = {} + +M.config = function () + vim.cmd [[ let maplocalleader = "," ]] +end + +return M
A
config/lvim/lua/u/package-info.lua
@@ -0,0 +1,14 @@
+local M = {} + +M.config = function() + require("package-info").setup({{ + autostart = true, + colors = { up_to_date = "#3C4048", outdated = "#6ec0fa" }, + icons = { + enable = true, + style = { up_to_date = "| ", outdated = "| " }, + }, + }}) +end + +return M
A
config/nvim/init.lua
@@ -0,0 +1,18 @@
+local pack_path = vim.fn.stdpath("data") .. "/site/pack" +local fmt = string.format + +local function ensure(user, repo) + local install_path = fmt("%s/packer/start/%s", pack_path, repo, repo) + if vim.fn.empty(vim.fn.glob(install_path)) > 0 then + vim.api.nvim_command(fmt("!git clone https://github.com/%s/%s %s", user, repo, install_path)) + vim.api.nvim_command(fmt("packadd %s", repo)) + end +end + +ensure("wbthomason", "packer.nvim") +ensure("Olical", "aniseed") + +vim.g["aniseed#env"] = { + module = "config.init", + compile = true, +}
M
config/rofi/config
@@ -1,4 +1,4 @@
-rofi.theme: nten-light +rofi.theme: nten rofi.font: Jetbarains Mono 12 rofi.auto-select: false rofi.hide-scrollbar: true
M
vscode/settings.json
@@ -1,11 +1,12 @@
{ "workbench.iconTheme": "material-icon-theme", - "workbench.colorTheme": "GitHub Light", + "workbench.colorTheme": "GitHub Dark Default", "workbench.sideBar.location": "right", "workbench.editor.untitled.hint": "hidden", "workbench.startupEditor": "none", - "workbench.panel.defaultLocation": "left", + "workbench.panel.defaultLocation": "bottom", "workbench.activityBar.visible": false, + "window.menuBarVisibility": "toggle", "update.showReleaseNotes": false, // Editor // "editor.cursorSmoothCaretAnimation": true,@@ -23,7 +24,7 @@ "editor.wordWrap": "off",
"editor.fontSize": 14, "editor.tabSize": 4, // Files - "explorer.compactFolders": false, + "explorer.compactFolders": true, "explorer.confirmDragAndDrop": false, "explorer.confirmDelete": false, "files.insertFinalNewline": false,@@ -31,32 +32,27 @@ "files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": false, "files.exclude": { "**/node_modules": true, - "**/env": true + "**/env": true, + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true }, // Git "gitlens.codeLens.enabled": true, "git.autofetch": true, "git.confirmSync": false, "git.enableSmartCommit": true, - // Vim - "vim.easymotion": true, - "vim.surround": true, - "vim.useSystemClipboard": true, - "vim.hlsearch": true, - "vim.incsearch": true, - "vim.leader": ";", - "vim.normalModeKeyBindings": [ - {"before": ["<space>"], "commands": [":nohl"]}, - ], - "vim.insertModeKeyBindings": [ - {"before": ["j", "k"], "after": ["<esc>"]} - ], - "vim.handleKeys": { "<C-w>": false, "<C-b>": false, "<C-n>": false, "<C-h>": false}, - // Expensions "terminal.integrated.tabs.enabled": false, + // Extensions "extensions.ignoreRecommendations": true, "docker.showStartPage": false, - // "prettier.semi": false, + "calva.myCljAliases": [ + "nREPL", + "nrepl", + "test" + ], + "calva.paredit.defaultKeyMap": "strict", // Languages "javascript.suggestionActions.enabled": false, "typescript.suggestionActions.enabled": false,@@ -66,7 +62,5 @@ "editor.tabSize": 2
}, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "window.menuBarVisibility": "toggle" - -}+ } +}
M
zshrc
@@ -17,6 +17,11 @@
## FNM eval $(fnm env) +## Functions +dotnet() { + $HOME/dotnet/dotnet "$@" +} + ## Aliases alias cls="clear" cp="cp -r" mkdir="mkdir -p" open="open_command" lg="lazygit" alias lv="lvim" vim="lvim"