Compare commits

...

12 Commits

Author SHA1 Message Date
Julian Raufelder 11dd83e10b
Minor changes 2024-03-03 14:15:21 +01:00
Julian Raufelder 3662c87f58
Merge branch 'master' of github.com:nvim-lua/kickstart.nvim 2024-02-04 00:52:21 +01:00
Julian Raufelder 94463cb021
Further enhancements 2024-02-04 00:48:46 +01:00
Micah Effiong bc4ad1218b
feat: added contexts for code action - source fix-all errors (#599)
* feat: added contexts for code action - source fix-all errors

* fix: resolve stylua checks

* fix: resolve stylua checks
2024-02-02 15:24:46 -05:00
Damjan 9000 c3ae716fb3
issue: #594 stylua workflow only on official kickstart repo (#609)
Only run the github stylua workflow check on the official
kickstart repo (nvim-lua/kickstart.nvim) so that it's not
enforced on any other forks.
As suggested by: @zwergius
2024-02-01 11:01:46 -05:00
Nazar b115814916
Add Onedark Style (#590)
* Add style options to Onedark setup (init.lua)

* stylua init.lua

* Load onedark through `require`

* Improve commenting
2024-01-29 13:52:50 -05:00
Victor Bertin deaafcf549
Set status line theme to the global colorscheme (#600) 2024-01-29 07:48:14 -05:00
Sreejith I V 2510c29d62
Removed duplicate line (#583) 2024-01-10 09:36:33 -05:00
Damjan 9000 60b93c95d3
README.md: rename the duplicate "Introduction" to "Getting Started" (#572)
Changing this second "Introduction" heading to "Getting Started"
The recent change in README which moved the youtube link from FAQ
to it's own section used the heading "Introduction" which is already
the first heading in the file.
2024-01-08 14:44:00 -05:00
Mohamad Alamin Yassin c11afa2f90
Add Missing Fields to Treesitter Config to Resolve Warnings (#582)
This commit introduces three additional fields - `sync_install`, `ignore_install`, and `modules` - to the Treesitter configuration. This update is aimed at resolving warnings that were previously displayed, potentially causing confusion or frustration for new users of Neovim. By explicitly defining these fields, the configuration aligns better with the latest `nvim-treesitter` requirements.
2024-01-08 12:17:01 -05:00
Damjan 9000 c4055a2212
Improve stylua github workflow (#571)
Addressing issue nvim-lua/kickstart.nvim#570

This improves the github workflow to no longer require manual
approval for PRs from first time contributors.

Changes the github event from pull_request to pull_request_target
and adds an explicit PR head checkout
2024-01-03 12:30:37 -05:00
gitressa d45e5fe855
Move video up on the README.md page (#563)
To help new users get started, how about moving the video link ("Effective Neovim: Instant IDE ") right after "Post Installation"?

This way new users, can install it, and right away proceed to learn how to use it.
2024-01-03 10:03:23 -05:00
5 changed files with 103 additions and 49 deletions

View File

@ -1,14 +1,17 @@
# Check Lua Formatting
name: Check Lua Formatting
on: pull_request
on: pull_request_target
jobs:
stylua-check:
if: github.repository == 'nvim-lua/kickstart.nvim'
name: Stylua Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Stylua Check
uses: JohnnyMorganz/stylua-action@v3
with:

View File

@ -71,6 +71,10 @@ If you would prefer to hide this step and run the plugin sync from the command l
nvim --headless "+Lazy! sync" +qa
```
### Getting Started
See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the previous version. Note: The install via init.lua is outdated, please follow the install instructions in this file instead. An updated video is coming soon.
### Recommended Steps
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo (so that you have your own copy that you can modify) and then installing you can install to your machine using the methods above.
@ -163,9 +167,6 @@ Each PR, especially those which increase the line count, should have a descripti
When you run Neovim using `nvim-kickstart` alias it will use the alternative config directory and the matching local directory `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim distribution that you would like to try out.
* What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* Are there any cool videos about this plugin?
* Current iteration of kickstart (coming soon)
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). Note the install via init.lua no longer works as specified. Please follow the install instructions in this file instead as they're up to date.
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
* The main purpose of kickstart is to serve as a teaching tool and a reference
configuration that someone can easily `git clone` as a basis for their own.

5
ftplugin/java.lua Normal file
View File

@ -0,0 +1,5 @@
local config = {
cmd = {'/usr/bin/jdtls'},
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
}
require('jdtls').start_or_attach(config)

View File

@ -199,8 +199,13 @@ require('lazy').setup({
-- Theme inspired by Atom
'navarasu/onedark.nvim',
priority = 1000,
lazy = false,
config = function()
vim.cmd.colorscheme 'onedark'
require('onedark').setup {
-- Set a style preset. 'dark' is default.
style = 'dark', -- dark, darker, cool, deep, warm, warmer, light
}
require('onedark').load()
end,
},
@ -211,7 +216,7 @@ require('lazy').setup({
opts = {
options = {
icons_enabled = false,
theme = 'onedark',
theme = 'auto',
component_separators = '|',
section_separators = '',
},
@ -308,6 +313,8 @@ require('lazy').setup({
'tpope/vim-surround',
'tpope/vim-commentary',
'github/copilot.vim',
'mfussenegger/nvim-jdtls',
'AckslD/nvim-neoclip.lua',
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository.
@ -487,6 +494,24 @@ local function telescope_live_grep_open_files()
prompt_title = 'Live Grep in Open Files',
}
end
local function telescope_find_files_in_home()
local opts = {
hidden = true,
cwd = "/home/julian"
}
require('telescope.builtin').find_files(opts)
end
local function telescope_find_files_in_home_hidden()
local opts = {
hidden = true,
cwd = "/home/julian"
}
require('telescope.builtin').find_files(opts)
end
vim.keymap.set('n', '<leader>s/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' })
vim.keymap.set('n', '<leader>ss', require('telescope.builtin').builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
@ -496,8 +521,12 @@ vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc
vim.keymap.set('n', '<leader>sG', ':LiveGrepGitRoot<cr>', { desc = '[S]earch by [G]rep on Git Root' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>sfn', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles [N]o Hidden' })
vim.keymap.set('n', '<leader>sfh', '<Cmd>Telescope find_files hidden=true no_ignore=true<Cr>', { desc = '[S]earch [F]iles [H]idden' })
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files, { desc = '[F]ind [F]iles no Hidden in current dir' })
vim.keymap.set('n', '<leader>fh', '<Cmd>Telescope find_files hidden=true no_ignore=true<Cr>', { desc = '[F]ind files [H]idden in current dir' })
vim.keymap.set('n', '<leader>fg', require('telescope.builtin').git_files, { desc = '[Find] files in [G]it [F]iles' })
vim.keymap.set('n', '<leader>fr', telescope_find_files_in_home, { desc = '[F]ind files starting in home, hidden' })
vim.keymap.set('n', '<leader>fs', telescope_find_files_in_home_hidden, { desc = '[F]ind files starting in home, no hidden' })
-- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter`
@ -509,7 +538,12 @@ vim.defer_fn(function()
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
-- Install languages synchronously (only applied to `ensure_installed`)
sync_install = false,
-- List of parsers to ignore installing
ignore_install = {},
-- You can specify additional Treesitter modules here: -- For example: -- playground = {--enable = true,-- },
modules = {},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
@ -586,7 +620,9 @@ local on_attach = function(_, bufnr)
end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('<leader>ca', function()
vim.lsp.buf.code_action { context = { only = { 'quickfix', 'refactor', 'source' } } }
end, '[C]ode [A]ction')
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
@ -597,7 +633,7 @@ local on_attach = function(_, bufnr)
-- See `:help K` for why this keymap
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
-- nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation') this breaks jumping between buffers in split view
-- Lesser used LSP functionality
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
@ -617,6 +653,7 @@ end
require('which-key').register {
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
['<leader>f'] = { name = '[F]ind', _ = 'which_key_ignore' },
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
@ -770,13 +807,10 @@ wilder.setup({modes = {':', '/', '?'}})
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
-- neo_tree
vim.keymap.set('n', '<leader>f', '<Cmd>Neotree toggle<Cr>', { desc = 'Toggle NeoTree' })
vim.keymap.set('n', '<leader>n', '<Cmd>Neotree toggle <Cr>', { desc = 'Toggle [N]eoTree' })
vim.keymap.set('n', '<leader>m', '<Cmd>Neotree float dir=%:p:h:h reveal_file=%:p <CR>', { desc = '[M]odify File NeoTree' })
-- database
vim.keymap.set('n', '<leader>nu', '<Cmd>DBUIToggle<Cr>', { desc = 'Toggle UI' })
vim.keymap.set('n', '<leader>nf', '<Cmd>DBUIFindBuffer<Cr>', { desc = 'Find buffer' })
vim.keymap.set('n', '<leader>nr', '<Cmd>DBUIRenameBuffer<Cr>', { desc = 'Rename buffer' })
vim.keymap.set('n', '<leader>nq', '<Cmd>DBUILastQueryInfo<Cr>', { desc = 'Last query info' })
vim.keymap.set('n', '<C-P>', ':Telescope find_files<CR>', { desc = 'Toggle [N]eoTree' })
-- harpoon
local mark = require('harpoon.mark')
@ -785,16 +819,25 @@ local ui = require('harpoon.ui')
vim.keymap.set('n', '<leader>hh', mark.add_file, { desc = 'Add file to harpoon'})
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu, { desc = 'Toggle harpoon quick menu'})
-- vim.keymap.set('n', '<C-h>', function () ui.nav_file(1) end, { desc = 'Harpoon file 1'})
vim.keymap.set('n', '<C-t>', function () ui.nav_file(2) end, { desc = 'Harpoon file 2'})
vim.keymap.set('n', '<C-n>', function () ui.nav_file(3) end, { desc = 'Harpoon file 3'})
vim.keymap.set('n', '<C-s>', function () ui.nav_file(4) end, { desc = 'Harpoon file 4'})
vim.keymap.set('n', '<C-t>', function () ui.nav_file(1) end, { desc = 'Harpoon file 1'})
vim.keymap.set('n', '<C-n>', function () ui.nav_file(2) end, { desc = 'Harpoon file 2'})
-- ctrl+s write
vim.api.nvim_set_keymap('n', '<C-s>', ':w<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', '<C-s>', '<Esc>:w<CR>i', {noremap = true, silent = true})
--- ctrl+q quit
vim.api.nvim_set_keymap('n', '<C-q>', ':q<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', '<C-q>', '<Esc>:q<CR>', {noremap = true, silent = true})
-- undotree
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle , { desc = 'Toggle Undotree'})
-- copilot disabled by default, enable it by typing :let b:copilot_enabled = 1
-- copilot disabled by default, enable it by typing :let b:copilot_enabled = 1 or executing ThisIsYourCaptainSpeaking
vim.g.copilot_assume_mapped = true
vim.api.nvim_exec([[ au BufNewFile,BufRead * let b:copilot_enabled = 0 ]], false)
vim.api.nvim_create_user_command('ThisIsYourCaptainSpeaking', 'let b:copilot_enabled = 1', {})
require('neoclip').setup()
vim.api.nvim_set_keymap('n', '<leader>cc', ':Telescope neoclip<CR>', {noremap = true, silent = true})

View File

@ -1,40 +1,42 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "2463d687fe704b76eb0aa3bb34e95f69a5bb0362" },
"LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" },
"fidget.nvim": { "branch": "main", "commit": "a4a7edfea37e557dbff5509ee374ffb57051bba9" },
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
"copilot.vim": { "branch": "release", "commit": "57a0115908895f465eb3476f03a0aaa7096e8fe1" },
"fidget.nvim": { "branch": "main", "commit": "60404ba67044c6ab01894dd5bf77bd64ea5e09aa" },
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"indent-blankline.nvim": { "branch": "master", "commit": "5da5546947f3125dfd6aa85ab21074dc83f776d5" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
"mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" },
"neo-tree.nvim": { "branch": "main", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" },
"neodev.nvim": { "branch": "main", "commit": "7cb4f7f29c6bf6f1d21a37f6dd6d12ba64266b09" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "80445d015d2b5f9af0d9e8bce63d303bc86eda8a" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lspconfig": { "branch": "master", "commit": "9bedcfed749755e43fc8bed46f85ce2044fe3b77" },
"nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" },
"nvim-treesitter": { "branch": "master", "commit": "e49f1e8ef3e8450a8446cb1f2bbb53c919f60b6d" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0e2d5bd4cbe75849a013901555d436a48c6680cb" },
"nvim-web-devicons": { "branch": "master", "commit": "808627b8d412b2a6b6fc6eed816fec3557198b01" },
"onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" },
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
"neo-tree.nvim": { "branch": "main", "commit": "f3941c57ec85d7bdb44fa53fd858fd80f159018f" },
"neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" },
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
"nui.nvim": { "branch": "main", "commit": "b81333d12f824dbed5eb231c8a4409a290fdd848" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-jdtls": { "branch": "master", "commit": "382b9f625861f47d95876bcfb4c261f3b96077cb" },
"nvim-lspconfig": { "branch": "master", "commit": "9553725789be682ecd945a527ec552e489ea8534" },
"nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-treesitter": { "branch": "master", "commit": "e3e5ff4ebddcbfa8f5798253ebd1f9b449e8ee69" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "95933e762e28f9d38b572d65e7e4da9d2f4d90cb" },
"nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" },
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
"vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" },
"vim-dadbod": { "branch": "master", "commit": "738cfc2ea6a1510fe23cba9006fef9291be70f7b" },
"undotree": { "branch": "master", "commit": "9dbbf3b7d19dda0d22ceca461818e4739ad8154d" },
"vim-commentary": { "branch": "master", "commit": "f67e3e67ea516755005e6cccb178bc8439c6d402" },
"vim-dadbod": { "branch": "master", "commit": "acb78e078dc4fe1e997ebf006be17aa3766d2ef4" },
"vim-dadbod-completion": { "branch": "master", "commit": "c920cb0ba3dff4b1b0ed373e1c0b3007dec696c2" },
"vim-dadbod-ui": { "branch": "master", "commit": "9ddb0623e69d696b7a8355b93e3950a8dc6e00a0" },
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" },
"vim-dadbod-ui": { "branch": "master", "commit": "165699c573469e6a95b48d35052f848c340c5911" },
"vim-fugitive": { "branch": "master", "commit": "840ce4a9d9087cf9c321917dd6dd050ec6c9c49c" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },