Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a030c6bfec | |||
| 08eec76067 | |||
| 3a831210d0 | |||
| dac73cf585 | |||
| 44f0fbbf3f |
@@ -1,10 +1,6 @@
|
|||||||
# Check Lua Formatting
|
# Check Lua Formatting
|
||||||
name: Check Lua Formatting
|
name: Check Lua Formatting
|
||||||
on:
|
on: pull_request_target
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stylua-check:
|
stylua-check:
|
||||||
@@ -13,9 +9,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Stylua Check
|
- name: Stylua Check
|
||||||
uses: JohnnyMorganz/stylua-action@v5
|
uses: JohnnyMorganz/stylua-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
version: latest
|
version: latest
|
||||||
|
|||||||
@@ -61,32 +61,23 @@ Neovim's configurations are located under the following paths, depending on your
|
|||||||
|
|
||||||
#### Recommended Step
|
#### Recommended Step
|
||||||
|
|
||||||
Create your own copy of this repo using GitHub's
|
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
|
||||||
["Use this template"](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template)
|
so that you have your own copy that you can modify, then install by cloning the
|
||||||
button so that you have your own copy that you can modify, then install by
|
fork to your machine using one of the commands below, depending on your OS.
|
||||||
cloning your new repo to your machine using one of the commands below,
|
|
||||||
depending on your OS.
|
|
||||||
|
|
||||||
Alternatively, you can [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
|
|
||||||
this repo if you prefer an easy upstream sync path (e.g., keeping your config
|
|
||||||
on a separate branch and fast-forwarding `master` from upstream). See the
|
|
||||||
[discussion in #1740](https://github.com/nvim-lua/kickstart.nvim/issues/1740)
|
|
||||||
for the tradeoffs between the two approaches.
|
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Your repo's URL will be something like this:
|
> Your fork's URL will be something like this:
|
||||||
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
||||||
|
|
||||||
You likely want to remove `nvim-pack-lock.json` from your repo's `.gitignore`
|
You likely want to remove `nvim-pack-lock.json` from your fork's `.gitignore`
|
||||||
file too - it's ignored in the kickstart repo to make maintenance easier, but
|
file too - it's ignored in the kickstart repo to make maintenance easier, but
|
||||||
it's recommended to track it in version control (see `:help vim.pack-lockfile`).
|
it's recommended to track it in version control (see `:help vim.pack-lockfile`).
|
||||||
|
|
||||||
#### Clone kickstart.nvim
|
#### Clone kickstart.nvim
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> If following the recommended step above (i.e., creating your own repo from
|
> If following the recommended step above (i.e., forking the repo), replace
|
||||||
> the template or fork), replace `nvim-lua` with `<your_github_username>`
|
> `nvim-lua` with `<your_github_username>` in the commands below
|
||||||
> in the commands below
|
|
||||||
|
|
||||||
<details><summary> Linux and Mac </summary>
|
<details><summary> Linux and Mac </summary>
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ P.S. You can delete this when you're done too. It's your config now! :)
|
|||||||
|
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
-- SECTION 1: OPTIONS
|
-- SECTION 1: OPTIONS
|
||||||
-- Core Neovim settings, leaders, options
|
-- Core Neovim settings, leaders, options, basic keymaps, basic autocmds
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
do
|
do
|
||||||
-- Enable faster startup by caching compiled Lua modules
|
-- Enable faster startup by caching compiled Lua modules
|
||||||
@@ -174,8 +174,8 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
-- SECTION 2: KEYMAPS & AUTOCMDS
|
-- SECTION 2: KEYMAPS
|
||||||
-- basic keymaps, basic autocmds
|
-- basic keymaps
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
do
|
do
|
||||||
|
|
||||||
@@ -749,8 +749,7 @@ do
|
|||||||
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end
|
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end
|
||||||
end
|
end
|
||||||
|
|
||||||
local current_settings = client.config.settings --[[@as lspconfig.settings.lua_ls]]
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', current_settings.Lua, {
|
|
||||||
runtime = {
|
runtime = {
|
||||||
version = 'LuaJIT',
|
version = 'LuaJIT',
|
||||||
path = { 'lua/?.lua', 'lua/?/init.lua' },
|
path = { 'lua/?.lua', 'lua/?/init.lua' },
|
||||||
@@ -759,7 +758,10 @@ do
|
|||||||
checkThirdParty = false,
|
checkThirdParty = false,
|
||||||
-- NOTE: this is a lot slower and will cause issues when working on your own configuration.
|
-- NOTE: this is a lot slower and will cause issues when working on your own configuration.
|
||||||
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
|
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
|
||||||
library = vim.api.nvim_get_runtime_file('', true),
|
library = vim.tbl_extend('force', vim.api.nvim_get_runtime_file('', true), {
|
||||||
|
'${3rd}/luv/library',
|
||||||
|
'${3rd}/busted/library',
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
@@ -782,11 +784,6 @@ do
|
|||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
require('mason').setup {}
|
require('mason').setup {}
|
||||||
|
|
||||||
-- Translates between nvim-lspconfig server names and mason.nvim package names (e.g. lua_ls <-> lua-language-server)
|
|
||||||
require('mason-lspconfig').setup {
|
|
||||||
automatic_enable = false, -- Change this to true if you want to automatically enable servers that are installed manually (e.g. via :Mason / :MasonInstall)
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
--
|
--
|
||||||
-- To check the current status of installed tools and/or manually install
|
-- To check the current status of installed tools and/or manually install
|
||||||
|
|||||||
Reference in New Issue
Block a user