all repos

dotfiles @ da1068fdc2e6c53bd0ef2b816c417338a6078f5a

i use rach linux btw
15 files changed, 169 insertions(+), 127 deletions(-)
update lvim
Author: neoteny ss2316544@gmail.com
Committed at: 2021-10-03 17:31:30 +0300
Parent: a537cad
M config/lvim/config.lua
···
        12
        12
         lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 }

      
        13
        13
         

      
        14
        14
         -- TreeSitter

      
        15
        
        -lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua", "go" }

      
        16
        
        -lvim.builtin.treesitter.indent.disable = { "clojure", "java", "python" }

      
        
        15
        +lvim.builtin.treesitter.ensure_installed = {

      
        
        16
        +  "javascript",

      
        
        17
        +  "typescript",

      
        
        18
        +  "jsdoc",

      
        
        19
        +  "yaml",

      
        
        20
        +  "toml",

      
        
        21
        +  "lua",

      
        
        22
        +  "go",

      
        
        23
        +}

      
        
        24
        +lvim.builtin.treesitter.indent.disable = { "python" }

      
        17
        25
         

      
        18
        26
         -- Telescope

      
        19
        27
         lvim.builtin.telescope.defaults.layout_config.prompt_position = "top"

      
        20
        
        -lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "env", ".bin" }

      
        
        28
        +lvim.builtin.telescope.defaults.file_ignore_patterns = {

      
        
        29
        +  ".git",

      
        
        30
        +  "node_modules",

      
        
        31
        +  "env",

      
        
        32
        +  ".bin",

      
        
        33
        +}

      
        21
        34
         

      
        22
        35
         -- NvimTree

      
        23
        36
         lvim.builtin.nvimtree.ignore = { ".git", "node_modules", ".bin", "env" }

      
        24
        37
         

      
        25
        
        --- Mappings

      
        26
        
        -lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>"

      
        27
        
        -lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>"

      
        28
        
        -lvim.keys.visual_mode["jk"] = "<esc>"

      
        29
        
        -lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" }

      
        30
        
        -lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" }

      
        31
        
        -lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" }

      
        32
        
        -lvim.builtin.which_key.mappings["t"] = {

      
        33
        
        -	name = "Test",

      
        34
        
        -	t = { "<cmd>Ultest<cr>", "Run test" },

      
        35
        
        -	s = { "<cmd>UltestStop<cr>", "Stop test" },

      
        36
        
        -	c = { "<cmd>UltestClear<cr>", "Clear test result" },

      
        37
        
        -	n = { "<cmd>UltestNearest<cr>", "Run test order by cursor" },

      
        38
        
        -	o = { "<cmd>UltestOutput<cr>", "Show output order by cursor" },

      
        39
        
        -	j = { "<Plug>(ultest-next-fail)", "Next fail" },

      
        40
        
        -	k = { "<Plug>(ultest-prev-fail)", "Prev fail" },

      
        41
        
        -}

      
        42
        
        -

      
        43
        
        -for i = 1, 9 do

      
        44
        
        -	lvim.keys.normal_mode[string.format("<A-%d>", i)] = string.format("<cmd>BufferGoto %d<cr>", i)

      
        45
        
        -end

      
        46
        
        -

      
        47
        
        --- Pluginos

      
        48
        
        -lvim.plugins = {

      
        49
        
        -	{ "tpope/vim-surround", keys = { "c", "y", "d" }, event = "BufRead" },

      
        50
        
        -	{ "folke/trouble.nvim", cmd = { "TroubleToggle" } },

      
        51
        
        -	{ "editorconfig/editorconfig-vim" },

      
        52
        
        -	{

      
        53
        
        -		"theHamsta/nvim-dap-virtual-text",

      
        54
        
        -		config = function()

      
        55
        
        -			require("user.conjure").setup()

      
        56
        
        -		end,

      
        57
        
        -	},

      
        58
        
        -	{

      
        59
        
        -		"folke/todo-comments.nvim",

      
        60
        
        -		event = "BufRead",

      
        61
        
        -		config = function()

      
        62
        
        -			require("todo-comments").setup({})

      
        63
        
        -		end,

      
        64
        
        -	},

      
        65
        
        -	{

      
        66
        
        -		"tzachar/cmp-tabnine",

      
        67
        
        -		run = "./install.sh",

      
        68
        
        -		event = "InsertEnter",

      
        69
        
        -		config = function()

      
        70
        
        -			require("cmp_tabnine.config"):setup({

      
        71
        
        -				max_lines = 1000,

      
        72
        
        -				max_num_results = 10,

      
        73
        
        -				sort = true,

      
        74
        
        -			})

      
        75
        
        -		end,

      
        76
        
        -	},

      
        77
        
        -	{

      
        78
        
        -		"folke/lua-dev.nvim",

      
        79
        
        -		ft = "lua",

      
        80
        
        -		config = function()

      
        81
        
        -			require("user.lua-dev").setup()

      
        82
        
        -		end,

      
        83
        
        -	},

      
        84
        
        -	{

      
        85
        
        -		"Smirnov-O/ts-unit.nvim",

      
        86
        
        -		keys = { "vip", "cip", "yip", "dip" },

      
        87
        
        -		config = function()

      
        88
        
        -			require("ts-unit").setup({ keymaps = true })

      
        89
        
        -		end,

      
        90
        
        -	},

      
        91
        
        -	{

      
        92
        
        -		"Olical/conjure",

      
        93
        
        -		ft = { "clojure", "fennel", "scheme" },

      
        94
        
        -		requires = { { "PaterJason/cmp-conjure", after = "conjure" } },

      
        95
        
        -		config = function()

      
        96
        
        -			require("user.conjure").setup()

      
        97
        
        -		end,

      
        98
        
        -	},

      
        99
        
        -	{

      
        100
        
        -		"rcarriga/vim-ultest",

      
        101
        
        -		requires = { { "vim-test/vim-test", after = "vim-ultest" } },

      
        102
        
        -		cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" },

      
        103
        
        -		run = ":UpdateRemotePlugins",

      
        104
        
        -	},

      
        105
        
        -}

      
        
        38
        +-- Others

      
        
        39
        +require "user.plugins"

      
        
        40
        +require "user.keymaps"

      
D config/lvim/ftplugin/java.lua
···
        1
        
        -if vim.fn.has("mac") == 1 then

      
        2
        
        -	WORKSPACE_PATH = "/Users/" .. USER .. "/workspace/"

      
        3
        
        -elseif vim.fn.has("unix") == 1 then

      
        4
        
        -	WORKSPACE_PATH = "/home/" .. USER .. "/workspace/"

      
        5
        
        -else

      
        6
        
        -	print("Unsupported system")

      
        7
        
        -end

      
        8
        
        -

      
        9
        
        -JAVA_LS_EXECUTABLE = os.getenv("HOME") .. "/.local/share/lunarvim/lvim/utils/bin/jdtls"

      
        10
        
        -

      
        11
        
        -require("jdtls").start_or_attach({

      
        12
        
        -	on_attach = require("lsp").common_on_attach,

      
        13
        
        -	cmd = { JAVA_LS_EXECUTABLE, WORKSPACE_PATH .. vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t") },

      
        14
        
        -})

      
        15
        
        -

      
        16
        
        -vim.api.nvim_set_keymap("n", "<leader>la", ":lua require('jdtls').code_action()<CR>", { noremap = true, silent = true })

      
        17
        
        -

      
        18
        
        -vim.cmd("command! -buffer JdtCompile lua require('jdtls').compile()")

      
        19
        
        -vim.cmd("command! -buffer JdtUpdateConfig lua require('jdtls').update_project_config()")

      
        20
        
        -vim.cmd("command! -buffer JdtJol lua require('jdtls').jol()")

      
        21
        
        -vim.cmd("command! -buffer JdtBytecode lua require('jdtls').javap()")

      
        22
        
        -vim.cmd("command! -buffer JdtJshell lua require('jdtls').jshell()")

      
D config/lvim/lsp-settings/jdtls.json
···
        1
        
        -{

      
        2
        
        -  "java.format.enabled": true

      
        3
        
        -}

      
M config/lvim/lsp-settings/yamlls.json
···
        1
        1
         {

      
        2
        2
           "yaml.schemas": {

      
        3
        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/ansible-playbook.json": ["*/playbook/**/*.yml", "*/playbooks/**/*.yml", "*/playbook/**/*.yaml", "*/playbooks/**/*.yaml", "ansible-playbook.yml"],

      
        5
        4
             "https://json.schemastore.org/yamllint.json": [".yamllint", ".yamllint.yml", ".yamllint.yaml"],

      
        6
        5
             "https://yarnpkg.com/configuration/yarnrc.json": [".yarnrc", ".yarnrc.yml"],

      
        7
        6
             "https://json.schemastore.org/github-action.json": ["*/.github/workflows/**/*.yml", "*/.github/workflows/**/*.yaml" ],

      
A config/lvim/lua/plug/lua-dev.lua
···
        
        1
        +local M = {}

      
        
        2
        +

      
        
        3
        +function M.setup()

      
        
        4
        +  local ok, lua_dev = pcall(require, "lua-dev")

      
        
        5
        +  if not ok then

      
        
        6
        +    return

      
        
        7
        +  end

      
        
        8
        +

      
        
        9
        +  lua_dev.setup {}

      
        
        10
        +end

      
        
        11
        +

      
        
        12
        +return M

      
A config/lvim/lua/plug/tabnine.lua
···
        
        1
        +local M = {}

      
        
        2
        +

      
        
        3
        +function M.setup()

      
        
        4
        +  local ok, tabnine = pcall(require, "cmp_tabnine.config")

      
        
        5
        +  if not ok then

      
        
        6
        +    return

      
        
        7
        +  end

      
        
        8
        +

      
        
        9
        +  tabnine:setup {

      
        
        10
        +    max_lines = 1000,

      
        
        11
        +    max_num_results = 10,

      
        
        12
        +    sort = true,

      
        
        13
        +  }

      
        
        14
        +end

      
        
        15
        +

      
        
        16
        +return M

      
A config/lvim/lua/plug/todo-comment.lua
···
        
        1
        +local M = {}

      
        
        2
        +

      
        
        3
        +function M.setup()

      
        
        4
        +  local ok, todo_comments = pcall(require, "todo-comments")

      
        
        5
        +  if not ok then

      
        
        6
        +    return

      
        
        7
        +  end

      
        
        8
        +

      
        
        9
        +  todo_comments.setup {}

      
        
        10
        +end

      
        
        11
        +

      
        
        12
        +return M

      
A config/lvim/lua/plug/ts-unit.lua
···
        
        1
        +local M = {}

      
        
        2
        +

      
        
        3
        +function M.setup()

      
        
        4
        +  local ok, ts_unit = pcall(require, "ts-unit")

      
        
        5
        +  if not ok then

      
        
        6
        +    return

      
        
        7
        +  end

      
        
        8
        +

      
        
        9
        +  ts_unit.setup {

      
        
        10
        +    keymaps = true,

      
        
        11
        +  }

      
        
        12
        +end

      
        
        13
        +

      
        
        14
        +return M

      
D config/lvim/lua/user/conjure.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -M.setup = function()

      
        4
        
        -	vim.g.maplocalleader = ","

      
        5
        
        -	vim.g["conjure#mapping#doc_word"] = "K"

      
        6
        
        -

      
        7
        
        -	-- Clojure

      
        8
        
        -	vim.g["conjure#client#clojure#nrepl#eval#auto_require"] = false

      
        9
        
        -	vim.g["conjure#client#clojure#nrepl#connection#auto_repl#enabled"] = false

      
        10
        
        -

      
        11
        
        -	-- Scheme

      
        12
        
        -	vim.g["conjure#client#scheme#stdio#command"] = "chicken-csi -quiet -:c"

      
        13
        
        -	vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "\n-#;%d-> "

      
        14
        
        -end

      
        15
        
        -

      
        16
        
        -return M

      
M config/lvim/lua/user/dap-virtual-text.luaconfig/lvim/lua/plug/dap.lua
···
        1
        1
         local M = {}

      
        2
        2
         

      
        3
        
        -M.setup = function ()

      
        
        3
        +function M.setup()

      
        
        4
        +  -- Virtual text

      
        4
        5
           vim.g.dap_virtual_text = true

      
        5
        6
         end

      
        6
        7
         

      
A config/lvim/lua/user/keymaps.lua
···
        
        1
        +lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>"

      
        
        2
        +lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>"

      
        
        3
        +lvim.keys.visual_mode["jk"] = "<esc>"

      
        
        4
        +

      
        
        5
        +-- Which key

      
        
        6
        +lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" }

      
        
        7
        +lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" }

      
        
        8
        +lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" }

      
        
        9
        +lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" }

      
        
        10
        +lvim.builtin.which_key.mappings["t"] = {

      
        
        11
        +  name = "Test",

      
        
        12
        +  t = { "<cmd>Ultest<cr>", "Run tests" },

      
        
        13
        +  s = { "<cmd>UltestStop<cr>", "Stop tests" },

      
        
        14
        +  c = { "<cmd>UltestClear<cr>", "Clear result" },

      
        
        15
        +  n = { "<cmd>UltestNearest<cr>", "Run test" },

      
        
        16
        +  o = { "<cmd>UltestOutput<cr>", "Show output" },

      
        
        17
        +  j = { "<Plug>(ultest-next-fail)", "Next fail" },

      
        
        18
        +  k = { "<Plug>(ultest-prev-fail)", "Prev fail" },

      
        
        19
        +}

      
        
        20
        +

      
        
        21
        +-- Beffers

      
        
        22
        +local fmt = string.format

      
        
        23
        +for i = 1, 9 do

      
        
        24
        +  lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i)

      
        
        25
        +end

      
A 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
        +    config = function()

      
        
        7
        +      require("plug.dap").setup()

      
        
        8
        +    end,

      
        
        9
        +  },

      
        
        10
        +  {

      
        
        11
        +    "folke/todo-comments.nvim",

      
        
        12
        +    event = "BufRead",

      
        
        13
        +    config = function()

      
        
        14
        +      require "plug.todo-comment"

      
        
        15
        +    end,

      
        
        16
        +  },

      
        
        17
        +  {

      
        
        18
        +    "tzachar/cmp-tabnine",

      
        
        19
        +    run = "./install.sh",

      
        
        20
        +    event = "InsertEnter",

      
        
        21
        +    config = function()

      
        
        22
        +      require "plug.tabnine"

      
        
        23
        +    end,

      
        
        24
        +  },

      
        
        25
        +  {

      
        
        26
        +    "folke/lua-dev.nvim",

      
        
        27
        +    ft = "lua",

      
        
        28
        +    config = function()

      
        
        29
        +      require("plug.lua-dev").setup()

      
        
        30
        +    end,

      
        
        31
        +  },

      
        
        32
        +  {

      
        
        33
        +    "Smirnov-O/ts-unit.nvim",

      
        
        34
        +    keys = { "vip", "cip", "yip", "dip" },

      
        
        35
        +    config = function()

      
        
        36
        +      require "plug.ts-unit"

      
        
        37
        +    end,

      
        
        38
        +  },

      
        
        39
        +  {

      
        
        40
        +    "rcarriga/vim-ultest",

      
        
        41
        +    requires = {

      
        
        42
        +      { "vim-test/vim-test", after = "vim-ultest" },

      
        
        43
        +    },

      
        
        44
        +    run = ":UpdateRemotePlugins",

      
        
        45
        +    cmd = {

      
        
        46
        +      "Ultest",

      
        
        47
        +      "UltestStop",

      
        
        48
        +      "UltestClear",

      
        
        49
        +      "UltestNearest",

      
        
        50
        +      "UltestOutput",

      
        
        51
        +    },

      
        
        52
        +  },

      
        
        53
        +}

      
A config/lvim/selene.toml
···
        
        1
        +std="vim"

      
A config/lvim/stylua.toml
···
        
        1
        +column_width = 120

      
        
        2
        +line_endings = "Unix"

      
        
        3
        +indent_type = "Spaces"

      
        
        4
        +indent_width = 2

      
        
        5
        +quote_style = "AutoPreferDouble"

      
        
        6
        +no_call_parentheses = true

      
A config/lvim/vim.toml
···
        
        1
        +[selene]

      
        
        2
        +base = "lua52"

      
        
        3
        +name = "vim"

      
        
        4
        +

      
        
        5
        +[vim]

      
        
        6
        +any = true

      
        
        7
        +

      
        
        8
        +[lvim]

      
        
        9
        +any = true