-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- leverage lazy-vim's best practice of listing individual plugin config lua files under nvim/lua/plugins and let lazy-vim merge those; see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - flatten nvim config folders - add tree sitter support for better syntax coloring - add LSP config for lua (requires lua-language-server to be installed) - add which-key to show possible key bindings after first typed cmd key - install additional LSP language support via :Mason
- Loading branch information
1 parent
49bcbd6
commit 4ae152f
Showing
19 changed files
with
244 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ end_of_line = lf | |
[*.{cmd,ps1,csv,doskey}] | ||
end_of_line = crlf | ||
|
||
[*.{sh,yml}] | ||
[*.{lua,sh,yml}] | ||
indent_size = 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"diagnostics.globals": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
{ | ||
"catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "4aaacbf5e5e2218fd05eb75703fe9e0f85335803" }, | ||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, | ||
"catppuccin": { "branch": "main", "commit": "048c18fc531703815f5e10765ea46ce9b2c75ae4" }, | ||
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, | ||
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, | ||
"mason-lspconfig.nvim": { "branch": "main", "commit": "3ba1b92b771f33256b4969d696b82c8ae7075364" }, | ||
"mason.nvim": { "branch": "main", "commit": "9c9416817c9f4e6f333c749327a1ed5355cfab61" }, | ||
"nordtheme": { "branch": "main", "commit": "f13f5dfbb784deddbc1d8195f34dfd9ec73e2295" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "59d4c14a1a4262cf637ff2420032593afa062749" }, | ||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "140edfcf25093e8b321d13e154cbce89ee868ca0" }, | ||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "cd4e0909948eb33d3959e133c16f837e4db122c6" }, | ||
"plenary.nvim": { "branch": "master", "commit": "663246936325062427597964d81d30eaa42ab1e4" }, | ||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, | ||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, | ||
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, | ||
"tokyonight.nvim": { "branch": "main", "commit": "67c6050e1ca41260c919236a098ba278472c7520" }, | ||
"vim-commentary": { "branch": "master", "commit": "f67e3e67ea516755005e6cccb178bc8439c6d402" }, | ||
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" }, | ||
"vim-fugitive": { "branch": "master", "commit": "854a8df0d06b8d3fcb30fa7f2b08c62b553eee3b" }, | ||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, | ||
"vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" } | ||
"vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" }, | ||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- neovim init file | ||
-- github.com/davidjenni/dotfiles | ||
|
||
local k = vim.keymap | ||
|
||
k.set('n', '<leader>h', '<cmd>noh<CR>', { desc = 'Clear highlights' }) | ||
k.set('n', '<c-k>', ':wincmd k<CR>', { desc = 'Move to window above' }) | ||
k.set('n', '<c-j>', ':wincmd j<CR>', { desc = 'Move to window below' }) | ||
k.set('n', '<c-h>', ':wincmd h<CR>', { desc = 'Move to window left' }) | ||
k.set('n', '<c-l>', ':wincmd l<CR>', { desc = 'Move to window right' }) | ||
|
||
-- plugins set their own keymaps in ~/.config/nvim/lua/plugins/*.lua | ||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
return { | ||
'tpope/vim-commentary', | ||
'tpope/vim-fugitive', | ||
'tpope/vim-surround', | ||
'tpope/vim-unimpaired', | ||
{ 'nvim-tree/nvim-web-devicons', lazy = true, }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
return { | ||
'lewis6991/gitsigns.nvim', | ||
event = { "BufReadPre", "BufNewFile" }, | ||
opts = { | ||
signs = { | ||
add = { text = "▎" }, | ||
change = { text = "▎" }, | ||
delete = { text = "" }, | ||
topdelete = { text = "" }, | ||
changedelete = { text = "▎" }, | ||
untracked = { text = "▎" }, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
return { | ||
{ | ||
"williamboman/mason.nvim", | ||
config = function() | ||
require("mason").setup() | ||
end | ||
}, | ||
|
||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
config = function() | ||
require("mason-lspconfig").setup({ | ||
ensure_installed = { "lua_ls" }, | ||
}) | ||
end | ||
}, | ||
|
||
{ | ||
-- neodev needs to start before nvim-lspconfig | ||
"folke/neodev.nvim", | ||
config = function() | ||
require("neodev").setup({}) | ||
end, | ||
}, | ||
|
||
{ | ||
"neovim/nvim-lspconfig", | ||
dependencies = { | ||
"williamboman/mason.nvim", | ||
"williamboman/mason-lspconfig.nvim", | ||
"j-hui/fidget.nvim", | ||
"folke/neodev.nvim", | ||
}, | ||
config = function() | ||
local lspconfig = require('lspconfig') | ||
lspconfig.lua_ls.setup({}) | ||
|
||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { desc = 'Show info about symbol under cursor'}) | ||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = 'Go to definition' }) | ||
vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, { desc = 'Show code actions' }) | ||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, { desc = 'Show references' }) | ||
end | ||
}, | ||
|
||
{ | ||
"j-hui/fidget.nvim", | ||
config = function() | ||
require("fidget").setup({}) | ||
end | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local config = function() | ||
require("lualine").setup({ | ||
options = { | ||
theme = "auto", | ||
globalstatus = true, | ||
component_separators = { left = "|", right = "|" }, | ||
section_separators = { left = "", right = "" }, | ||
}, | ||
sections = { | ||
lualine_a = { "mode" }, | ||
lualine_b = { "branch", "diff", "diagnostics" }, | ||
lualine_c = { "filename", "buffers" }, | ||
lualine_x = { "encoding", "fileformat", "filetype" }, | ||
lualine_y = { "progress" }, | ||
lualine_z = { "location", '%B' }, | ||
}, | ||
tabline = {}, | ||
}) | ||
end | ||
|
||
return { | ||
"nvim-lualine/lualine.nvim", | ||
dependencies = { | ||
'nvim-tree/nvim-web-devicons' | ||
}, | ||
lazy = false, | ||
config = config, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.