diff options
| -rw-r--r-- | .github/ISSUE_TEMPLATE/general-issue-form.yaml | 2 | ||||
| -rw-r--r-- | .github/ISSUE_TEMPLATE/lsp-issue-form.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/install.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/plugins.yml | 2 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | lua/lvim/core/nvimtree.lua | 12 | ||||
| -rw-r--r-- | lua/lvim/lsp/config.lua | 5 | ||||
| -rw-r--r-- | lua/lvim/lsp/peek.lua | 13 | ||||
| -rw-r--r-- | lua/lvim/plugins.lua | 1 | ||||
| -rw-r--r-- | snapshots/default.json | 44 | ||||
| -rw-r--r-- | utils/installer/install.ps1 | 2 | ||||
| -rwxr-xr-x | utils/installer/install.sh | 43 | 
12 files changed, 79 insertions, 52 deletions
| diff --git a/.github/ISSUE_TEMPLATE/general-issue-form.yaml b/.github/ISSUE_TEMPLATE/general-issue-form.yaml index fed53efe..fcf22684 100644 --- a/.github/ISSUE_TEMPLATE/general-issue-form.yaml +++ b/.github/ISSUE_TEMPLATE/general-issue-form.yaml @@ -33,7 +33,7 @@ body:    - type: input      id: nvim-version      attributes: -      label: Neovim version (>= 0.6.1) +      label: Neovim version (>= 0.7)        description: "Output of `nvim --version`"        placeholder: |          NVIM v0.7-dev+209-g0603eba6e diff --git a/.github/ISSUE_TEMPLATE/lsp-issue-form.yaml b/.github/ISSUE_TEMPLATE/lsp-issue-form.yaml index 6c6d3235..6b326b26 100644 --- a/.github/ISSUE_TEMPLATE/lsp-issue-form.yaml +++ b/.github/ISSUE_TEMPLATE/lsp-issue-form.yaml @@ -27,7 +27,7 @@ body:    - type: input      id: nvim-version      attributes: -      label: Neovim version (>= 0.6.1) +      label: Neovim version (>= 0.7)        description: "Output of `nvim --version`"        placeholder: |          NVIM v0.7-dev+209-g0603eba6e diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index 54da94bc..51336ed9 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -57,7 +57,7 @@ jobs:          uses: rhysd/action-setup-vim@v1          with:            neovim: true -          version: v0.6.1 +          version: v0.7.0        - name: Install LunarVim          timeout-minutes: 4 diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index ba16ddca..d84c6b36 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -33,7 +33,7 @@ jobs:          uses: rhysd/action-setup-vim@v1          with:            neovim: true -          version: v0.6.1 +          version: v0.7        - name: Install LunarVim          timeout-minutes: 4 @@ -29,7 +29,7 @@  ## Install In One Command! -Make sure you have the release version of Neovim (0.6.1+). +Make sure you have the release version of Neovim (0.7+).  ### Linux: @@ -107,7 +107,6 @@ formatters.setup {  -- set additional linters  local linters = require "lvim.lsp.null-ls.linters"  linters.setup { -  { command = "black" },    {      command = "eslint_d",      ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports. diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index bcdf963d..385708ed 100644 --- a/lua/lvim/core/nvimtree.lua +++ b/lua/lvim/core/nvimtree.lua @@ -68,7 +68,7 @@ function M.config()        },        filters = {          dotfiles = false, -        custom = { "node_modules", ".cache" }, +        custom = { "node_modules", "\\.cache" },        },        trash = {          cmd = "trash", @@ -122,9 +122,9 @@ function M.config()  end  function M.setup() -  local status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") +  local status_ok, nvim_tree = pcall(require, "nvim-tree")    if not status_ok then -    Log:error "Failed to load nvim-tree.config" +    Log:error "Failed to load nvim-tree"      return    end @@ -158,11 +158,11 @@ function M.setup()      }    end +  nvim_tree.setup(lvim.builtin.nvimtree.setup) +    if lvim.builtin.nvimtree.on_config_done then -    lvim.builtin.nvimtree.on_config_done(nvim_tree_config) +    lvim.builtin.nvimtree.on_config_done(nvim_tree)    end - -  require("nvim-tree").setup(lvim.builtin.nvimtree.setup)  end  function M.start_telescope(telescope_mode) diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index 182f8fbf..eada4ce7 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -78,6 +78,11 @@ return {      style = "minimal",      border = "rounded",    }, +  peek = { +    max_height = 15, +    max_width = 30, +    context = 10, +  },    on_attach_callback = nil,    on_init_callback = nil,    automatic_servers_installation = true, diff --git a/lua/lvim/lsp/peek.lua b/lua/lvim/lsp/peek.lua index eb774a77..65c67e92 100644 --- a/lua/lvim/lsp/peek.lua +++ b/lua/lvim/lsp/peek.lua @@ -29,7 +29,10 @@ local function create_floating_file(location, opts)    local contents = vim.api.nvim_buf_get_lines(      bufnr,      range.start.line, -    math.min(range["end"].line + 1 + (opts.context or 10), range.start.line + (opts.max_height or 15)), -- Don't let the window be more that 15 lines long(height) +    math.min( +      range["end"].line + 1 + (opts.context or lvim.lsp.peek.max_height), +      range.start.line + (opts.max_height or lvim.lsp.peek.max_height) +    ),      false    )    if next(contents) == nil then @@ -38,7 +41,11 @@ local function create_floating_file(location, opts)    end    local width, height = vim.lsp.util._make_floating_popup_size(contents, opts)    local if_nil = vim.F.if_nil -  opts = vim.lsp.util.make_floating_popup_options(if_nil(width, 30), if_nil(height, 10), opts) +  opts = vim.lsp.util.make_floating_popup_options( +    if_nil(width, lvim.lsp.peek.max_width), +    if_nil(height, lvim.lsp.peek.max_height), +    opts +  )    -- Don't make it minimal as it is meant to be fully featured    opts["style"] = nil @@ -65,7 +72,7 @@ local function preview_location_callback(result)    local opts = {      border = "rounded", -    context = 10, +    context = lvim.lsp.peek.context,    }    if vim.tbl_islist(result) then diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index f3b4d7c6..1b885a09 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -114,7 +114,6 @@ local core_plugins = {    -- Treesitter    {      "nvim-treesitter/nvim-treesitter", -    branch = vim.fn.has "nvim-0.6" == 1 and "master" or "0.5-compat",      -- run = ":TSUpdate",      config = function()        require("lvim.core.treesitter").setup() diff --git a/snapshots/default.json b/snapshots/default.json index 65166ec1..445a0b53 100644 --- a/snapshots/default.json +++ b/snapshots/default.json @@ -1,21 +1,21 @@  {    "Comment.nvim": { -    "commit": "0aaea32" +    "commit": "8f37791"    },    "DAPInstall.nvim": { -    "commit": "24923c3" +    "commit": "bbda2b0"    },    "FixCursorHold.nvim": {      "commit": "1bfb32e"    },    "LuaSnip": { -    "commit": "5d3b468" +    "commit": "6b67cb1"    },    "alpha-nvim": {      "commit": "6655228"    },    "bufferline.nvim": { -    "commit": "bb3ac30" +    "commit": "f02e19b"    },    "cmp-buffer": {      "commit": "d66c4c2" @@ -30,52 +30,52 @@      "commit": "b108297"    },    "friendly-snippets": { -    "commit": "e302658" +    "commit": "5fd8b92"    },    "gitsigns.nvim": { -    "commit": "f2e9e30" +    "commit": "f83a2e1"    },    "lua-dev.nvim": {      "commit": "a0ee777"    },    "lualine.nvim": { -    "commit": "385580e" +    "commit": "18a07f7"    },    "nlsp-settings.nvim": { -    "commit": "21a00be" +    "commit": "114e2ff"    },    "null-ls.nvim": { -    "commit": "82be4bf" +    "commit": "a887bd6"    },    "nvim-autopairs": { -    "commit": "6fb0479" +    "commit": "38d486a"    },    "nvim-cmp": { -    "commit": "b5433f9" +    "commit": "433af3d"    },    "nvim-dap": { -    "commit": "10b5781" +    "commit": "d6d8317"    },    "nvim-lsp-installer": { -    "commit": "39f84cd" +    "commit": "d86aad8"    },    "nvim-lspconfig": { -    "commit": "fd7843a" +    "commit": "ad9903c"    },    "nvim-notify": { -    "commit": "9655936" +    "commit": "2c8f744"    },    "nvim-tree.lua": { -    "commit": "477536c" +    "commit": "ce463a5"    },    "nvim-treesitter": { -    "commit": "05ba924" +    "commit": "bd2f5d7"    },    "nvim-ts-context-commentstring": {      "commit": "8834375"    },    "nvim-web-devicons": { -    "commit": "09e6231" +    "commit": "4febe73"    },    "onedarker.nvim": {      "commit": "b00dd21" @@ -84,7 +84,7 @@      "commit": "4dedd3b"    },    "plenary.nvim": { -    "commit": "13f9959" +    "commit": "9069d14"    },    "popup.nvim": {      "commit": "b7404d3" @@ -93,7 +93,7 @@      "commit": "cef52b8"    },    "schemastore.nvim": { -    "commit": "71a0a25" +    "commit": "be624ba"    },    "structlog.nvim": {      "commit": "6f1403a" @@ -102,10 +102,10 @@      "commit": "8ec164b"    },    "telescope.nvim": { -    "commit": "b7ae91c" +    "commit": "92019d5"    },    "toggleterm.nvim": { -    "commit": "1a608cc" +    "commit": "dca8f4d"    },    "which-key.nvim": {      "commit": "a3c19ec" diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1 index 182e7bac..31f862f3 100644 --- a/utils/installer/install.ps1 +++ b/utils/installer/install.ps1 @@ -82,7 +82,7 @@ function print_missing_dep_msg($dep) {      Write-Output "Please install it first and re-run the installer."  } -$winget_package_matrix=@{"git" = "Git.Git"; "nvim" = "nvim.nvim"; "make" = "GnuWin32.Make"; "node" = "OpenJS.NodeJS"; "pip" = "Python.Python.3"} +$winget_package_matrix=@{"git" = "Git.Git"; "nvim" = "Neovim.Neovim"; "make" = "GnuWin32.Make"; "node" = "OpenJS.NodeJS"; "pip" = "Python.Python.3"}  $scoop_package_matrix=@{"git" = "git"; "nvim" = "neovim-nightly"; "make" = "make"; "node" = "nodejs"; "pip" = "python3"}  function install_system_package($dep) { diff --git a/utils/installer/install.sh b/utils/installer/install.sh index b44880bd..66149cf6 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -85,6 +85,25 @@ function msg() {    printf "%s\n" "$text"  } +function confirm() { +  local question="$1" +  while true; do +    msg "$question" +    read -p "[y]es or [n]o (default: no) : " -r answer +    case "$answer" in +      y | Y | yes | YES | Yes) +        return 0 +        ;; +      n | N | no | NO | No | *[[:blank:]]* | "") +        return 1 +        ;; +      *) +        msg "Please answer [y]es or [n]o." +        ;; +    esac +  done +} +  function main() {    parse_arguments "$@" @@ -97,17 +116,15 @@ function main() {    if [ "$ARGS_INSTALL_DEPENDENCIES" -eq 1 ]; then      if [ "$INTERACTIVE_MODE" -eq 1 ]; then -      msg "Would you like to install LunarVim's NodeJS dependencies?" -      read -p "[y]es or [n]o (default: no) : " -r answer -      [ "$answer" != "${answer#[Yy]}" ] && install_nodejs_deps - -      msg "Would you like to install LunarVim's Python dependencies?" -      read -p "[y]es or [n]o (default: no) : " -r answer -      [ "$answer" != "${answer#[Yy]}" ] && install_python_deps - -      msg "Would you like to install LunarVim's Rust dependencies?" -      read -p "[y]es or [n]o (default: no) : " -r answer -      [ "$answer" != "${answer#[Yy]}" ] && install_rust_deps +      if confirm "Would you like to install LunarVim's NodeJS dependencies?"; then +        install_nodejs_deps +      fi +      if confirm "Would you like to install LunarVim's Python dependencies?"; then +        install_python_deps +      fi +      if confirm "Would you like to install LunarVim's Rust dependencies?"; then +        install_rust_deps +      fi      else        install_nodejs_deps        install_python_deps @@ -180,11 +197,11 @@ function print_missing_dep_msg() {  }  function check_neovim_min_version() { -  local verify_version_cmd='if !has("nvim-0.6.1") | cquit | else | quit | endif' +  local verify_version_cmd='if !has("nvim-0.7") | cquit | else | quit | endif'    # exit with an error if min_version not found    if ! nvim --headless -u NONE -c "$verify_version_cmd"; then -    echo "[ERROR]: LunarVim requires at least Neovim v0.6.1 or higher" +    echo "[ERROR]: LunarVim requires at least Neovim v0.7 or higher"      exit 1    fi  } | 
