24 files changed,
4 insertions(+),
306 deletions(-)
jump to
D
config/lvim/config.lua
··· 1 -vim.o.relativenumber = true 2 - 3 -lvim.format_on_save = true 4 -lvim.lint_on_save = true 5 -lvim.colorscheme = "onedarker" 6 - 7 --- Default fatures 8 -lvim.builtin.terminal.active = true 9 -lvim.builtin.dashboard.active = true 10 -lvim.builtin.dap.active = true 11 - 12 --- GitSigns 13 -lvim.builtin.gitsigns.opts.current_line_blame = true 14 -lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 } 15 - 16 --- TreeSitter 17 -lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "yaml", "toml", "lua", "go", "gomod" } 18 -lvim.builtin.treesitter.indent.disable = { "python" } 19 - 20 --- Telescope 21 -lvim.builtin.telescope.defaults.layout_config.prompt_position = "top" 22 -lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "target", "env", ".bin" } 23 - 24 --- NvimTree 25 -lvim.builtin.nvimtree.ignore = { ".git", "node_modules", ".bin", "env" } 26 - 27 --- LSP 28 -lvim.lsp.override = { "go", "gopls" } 29 - 30 --- Others 31 -require "user.plugins" 32 -require "user.keymaps"
D
config/lvim/ftplugin/javascript.lua
··· 1 -lvim.lang.javascript.formatters = { 2 - -- { exe = "eslint_d" }, 3 - { exe = "prettierd" }, 4 -} 5 - 6 -lvim.lang.javascript.linters = { 7 - { exe = "eslint_d" }, 8 -} 9 - 10 --- Debugger 11 -require("dap-install").config("jsnode", {}) 12 - 13 --- Lsp 14 -lvim.lang.javascript.lsp.setup.handlers = { 15 - ["textDocument/publishDiagnostics"] = function(_, _, p, id, _, cfg) 16 - if p.diagnostics ~= nil then 17 - local i = 1 18 - while i <= #p.diagnostics do 19 - if p.diagnostics[i].code == 80001 then 20 - table.remove(p.diagnostics, i) 21 - else 22 - i = i + 1 23 - end 24 - end 25 - end 26 - vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, id, _, cfg) 27 - end, 28 -}
D
config/lvim/lsp-settings/jsonls.json
··· 1 -{ 2 - "json.schemas": [ 3 - {"url": "https://json.schemastore.org/package.json", "fileMatch": ["package.json"]}, 4 - {"url": "http://json.schemastore.org/tsconfig", "fileMatch": ["tsconfig.json", "tsconfig.*.json"]}, 5 - {"url": "http://json.schemastore.org/lerna", "fileMatch": ["lerna.json"]}, 6 - {"url": "http://json.schemastore.org/babelrc.json", "fileMatch": [".babelrc.json", ".babelrc", "babel.config.json"]}, 7 - {"url": "http://json.schemastore.org/eslintrc", "fileMatch": [".eslintrc.json", ".eslintrc"]}, 8 - {"url": "https://bucklescript.github.io/bucklescript/docson/build-schema.json", "fileMatch": ["bsconfig.json"]}, 9 - {"url": "http://json.schemastore.org/prettierrc", "fileMatch": [".prettierrc", ".prettierrc.json", "prettier.config.json"]}, 10 - {"url": "http://json.schemastore.org/now", "fileMatch": ["now.json"]}, 11 - {"url": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json", "fileMatch": ["openapi.json", "swagger.json"]}, 12 - {"url": "https://json.schemastore.org/nest-cli.json", "fileMatch": ["nest-cli.json"]}, 13 - {"url": "https://json.schemastore.org/nodemon.json", "fileMatch": ["nodemon.json"]} 14 - ] 15 -}
D
config/lvim/lsp-settings/yamlls.json
··· 1 -{ 2 - "yaml.schemas": { 3 - "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": ["docker-compose.yml", "docker-compose.yaml"], 4 - "https://json.schemastore.org/yamllint.json": [".yamllint", ".yamllint.yml", ".yamllint.yaml"], 5 - "https://yarnpkg.com/configuration/yarnrc.json": [".yarnrc", ".yarnrc.yml"], 6 - "https://json.schemastore.org/github-action.json": ["*/.github/workflows/**/*.yml", "*/.github/workflows/**/*.yaml" ], 7 - "https://json.schemastore.org/gitlab-ci.json": [".gitlab-ci.yml"], 8 - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": ["openapi.yaml", "openapi.yml", "swagger.yml", "swagger.yal"] 9 - } 10 -}
D
config/lvim/lua/plug/tabnine.lua
··· 1 -local M = {} 2 - 3 -function M.setup() 4 - local ok, tabnine_cfg = pcall(require, "cmp_tabnine.config") 5 - if not ok then 6 - return 7 - end 8 - 9 - tabnine_cfg:setup { 10 - max_lines = 1000, 11 - max_num_results = 10, 12 - sort = true, 13 - } 14 -end 15 - 16 -return M
D
config/lvim/lua/user/keymaps.lua
··· 1 -lvim.keys.insert_mode["<C-BS>"] = "<C-w>" 2 -lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>" 3 -lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>" 4 -lvim.keys.term_mode["jk"] = "<C-\\><C-n>" 5 -lvim.keys.visual_mode["jk"] = "<esc>" 6 - 7 --- Which key 8 -lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" } 9 -lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" } 10 -lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" } 11 -lvim.builtin.which_key.mappings["t"] = { 12 - name = "Test", 13 - t = { "<cmd>Ultest<cr>", "Run tests" }, 14 - s = { "<cmd>UltestStop<cr>", "Stop tests" }, 15 - c = { "<cmd>UltestClear<cr>", "Clear result" }, 16 - n = { "<cmd>UltestNearest<cr>", "Run test" }, 17 - o = { "<cmd>UltestOutput<cr>", "Show output" }, 18 - j = { "<Plug>(ultest-next-fail)", "Next fail" }, 19 - k = { "<Plug>(ultest-prev-fail)", "Prev fail" }, 20 -} 21 - 22 --- Beffers 23 -lvim.keys.normal_mode["<A-0>"] = "<cmd>BufferLast<cr>" 24 -local fmt = string.format 25 -for i = 1, 9 do 26 - lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i) 27 -end
D
config/lvim/lua/user/plugins.lua
··· 1 -lvim.plugins = { 2 - { "tpope/vim-surround", keys = { "c", "y", "d" }, event = "BufRead" }, 3 - { "folke/trouble.nvim", cmd = "TroubleToggle" }, 4 - { 5 - "theHamsta/nvim-dap-virtual-text", 6 - after = "nvim-dap", 7 - config = function() 8 - require("plug.dap").setup() 9 - end, 10 - }, 11 - { 12 - "kristijanhusak/orgmode.nvim", 13 - ft = "org", 14 - config = function() 15 - require"orgmode".setup {} 16 - end, 17 - }, 18 - { 19 - "folke/todo-comments.nvim", 20 - event = "BufRead", 21 - config = function() 22 - require("plug.todo-comment").setup() 23 - end, 24 - }, 25 - { 26 - "tzachar/cmp-tabnine", 27 - run = "./install.sh", 28 - event = "InsertEnter", 29 - config = function() 30 - require("plug.tabnine").setup() 31 - end, 32 - }, 33 - { 34 - "folke/lua-dev.nvim", 35 - ft = "lua", 36 - config = function() 37 - require("plug.lua-dev").setup() 38 - end, 39 - }, 40 - { 41 - "Smirnov-O/ts-unit.nvim", 42 - keys = { "vip", "cip", "yip", "dip" }, 43 - config = function() 44 - require("plug.ts-unit").setup { keymaps = true } 45 - end, 46 - }, 47 - { 48 - "rcarriga/vim-ultest", 49 - requires = { 50 - { "vim-test/vim-test", after = "vim-ultest" }, 51 - }, 52 - cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" }, 53 - run = ":UpdateRemotePlugins", 54 - config = function() 55 - require("plug.ultest").setup() 56 - end, 57 - }, 58 -}
M
zshrc
··· 4 4 ## Variables 5 5 export GOPATH="$HOME/go" 6 6 export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$HOME/.yarn/bin:$HOME/.luarocks/bin:$HOME/.cargo/bin:$PATH" 7 -export EDITOR="lvim" 8 - 9 -## FzF 10 -export FZF_DEFAULT_COMMAND="fd -t f -t l -E node_modules -E env -E __pycache__ -E target" 7 +export EDITOR="nvim" 11 8 12 9 ## Oh my zsh 13 10 plugins=(git dotenv npm yarn extract) ··· 28 25 29 26 ## Aliases 30 27 alias cls="clear" cp="cp -r" mkdir="mkdir -p" open="open_command" lg="lazygit" 31 -alias v="nvim" vim="v" 28 +alias v="nvim" vim="v" m="make" 32 29 alias ...="cd ../.." .3="cd ../../.." 33 30 alias gor="go run" gob="go build" gog="go get" goi="go install" got="go test" 34 31 alias n="npm" asdfi=". /opt/asdf-vm/asdf.sh"