Skip to content

Commit 255a013

Browse files
Merge branch 'nvim-lua:master' into master
2 parents 522b67b + e947649 commit 255a013

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ External Requirements:
3333
- If you want to write Golang, you will need `go`
3434
- etc.
3535

36-
> **NOTE**
36+
> [!NOTE]
3737
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
3838
> and quick install snippets
3939
4040
### Install Kickstart
4141

42-
> **NOTE**
42+
> [!NOTE]
4343
> [Backup](#FAQ) your previous configuration (if any exists)
4444
4545
Neovim's configurations are located under the following paths, depending on your OS:
@@ -56,7 +56,7 @@ Neovim's configurations are located under the following paths, depending on your
5656
so that you have your own copy that you can modify, then install by cloning the
5757
fork to your machine using one of the commands below, depending on your OS.
5858

59-
> **NOTE**
59+
> [!NOTE]
6060
> Your fork's URL will be something like this:
6161
> `https://github.com/<your_github_username>/kickstart.nvim.git`
6262
@@ -65,7 +65,8 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
6565
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
6666

6767
#### Clone kickstart.nvim
68-
> **NOTE**
68+
69+
> [!NOTE]
6970
> If following the recommended step above (i.e., forking the repo), replace
7071
> `nvim-lua` with `<your_github_username>` in the commands below
7172

init.lua

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ vim.opt.cursorline = true
156156
-- Minimal number of screen lines to keep above and below the cursor.
157157
vim.opt.scrolloff = 10
158158

159+
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
160+
-- instead raise a dialog asking if you wish to save the current file(s)
161+
-- See `:help 'confirm'`
162+
vim.opt.confirm = true
163+
159164
-- [[ Basic Keymaps ]]
160165
-- See `:help vim.keymap.set()`
161166

@@ -189,6 +194,12 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
189194
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
190195
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
191196

197+
-- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes
198+
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
199+
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
200+
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
201+
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
202+
192203
-- [[ Basic Autocommands ]]
193204
-- See `:help lua-guide-autocommands`
194205

@@ -789,16 +800,14 @@ require('lazy').setup({
789800
-- have a well standardized coding style. You can add additional
790801
-- languages here or re-enable it for the disabled ones.
791802
local disable_filetypes = { c = true, cpp = true }
792-
local lsp_format_opt
793803
if disable_filetypes[vim.bo[bufnr].filetype] then
794-
lsp_format_opt = 'never'
804+
return nil
795805
else
796-
lsp_format_opt = 'fallback'
806+
return {
807+
timeout_ms = 500,
808+
lsp_format = 'fallback',
809+
}
797810
end
798-
return {
799-
timeout_ms = 500,
800-
lsp_format = lsp_format_opt,
801-
}
802811
end,
803812
formatters_by_ft = {
804813
lua = { 'stylua' },

0 commit comments

Comments
 (0)