Compare commits
5 Commits
faba8a05e6
...
f07598688f
| Author | SHA1 | Date | |
|---|---|---|---|
|
f07598688f
|
|||
|
e696472c5b
|
|||
|
dcfd134a4e
|
|||
|
77d0a1c449
|
|||
|
7b1044214f
|
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[*.{nix,lua,yaml,css}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_size = 4
|
||||||
21
.lazy.lua
Normal file
21
.lazy.lua
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua",
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.sources = opts.sources or {}
|
||||||
|
table.insert(opts.sources, {
|
||||||
|
name = "lazydev",
|
||||||
|
group_index = 0,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -64,8 +64,8 @@ local extra_config = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
qmlls = {
|
qmlls = {
|
||||||
cmd = {"qmlls", "-E"}
|
cmd = { "qmlls", "-E" },
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
M = {
|
|
||||||
-- ensure_installed = require("plugins.lsp.servers")
|
|
||||||
ensure_installed = {},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
M = {
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
package_installed = "✓",
|
|
||||||
package_pending = "➜",
|
|
||||||
package_uninstalled = "✗",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -17,4 +17,16 @@ local opt = require("core.globals").keymap_opt
|
|||||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", opt)
|
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", opt)
|
||||||
vim.keymap.set("n", "<leader>te", ":NvimTreeFocus<CR>", opt)
|
vim.keymap.set("n", "<leader>te", ":NvimTreeFocus<CR>", opt)
|
||||||
|
|
||||||
return M
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
group = vim.api.nvim_create_augroup("NvimTreeCloseOnLast", { clear = true }),
|
||||||
|
pattern = "NvimTree*",
|
||||||
|
callback = function()
|
||||||
|
if vim.api.nvim_call_function("winlayout", {})[1] == "leaf" and vim.bo.filetype == "NvimTree" then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd("NvimTreeClose")
|
||||||
|
end, 10)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -113,7 +113,7 @@ local plugins = {
|
|||||||
"MysticalDevil/inlay-hints.nvim",
|
"MysticalDevil/inlay-hints.nvim",
|
||||||
event = "LspAttach",
|
event = "LspAttach",
|
||||||
dependencies = { "neovim/nvim-lspconfig" },
|
dependencies = { "neovim/nvim-lspconfig" },
|
||||||
opts = {}
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hedyhli/outline.nvim",
|
"hedyhli/outline.nvim",
|
||||||
@@ -149,7 +149,7 @@ local plugins = {
|
|||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {}
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
@@ -179,22 +179,42 @@ local plugins = {
|
|||||||
require("telescope").setup(require("plugins.telescope"))
|
require("telescope").setup(require("plugins.telescope"))
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"dnlhc/glance.nvim",
|
||||||
|
cmd = "Glance",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>lr",
|
||||||
|
"<cmd>Glance references<cr>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ld",
|
||||||
|
"<cmd>Glance definitions<cr>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>lD",
|
||||||
|
"<cmd>Glance type_definitions<cr>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>li",
|
||||||
|
"<cmd>Glance implementations<cr>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ggandor/leap.nvim",
|
"ggandor/leap.nvim",
|
||||||
dependencies = { "tpope/vim-repeat" },
|
dependencies = { "tpope/vim-repeat" },
|
||||||
config = function()
|
config = function()
|
||||||
require("leap").set_default_mappings()
|
vim.keymap.set({ "n", "x", "o" }, "s", "<Plug>(leap)")
|
||||||
|
vim.keymap.set("n", "S", "<Plug>(leap-from-window)")
|
||||||
-- Exclude whitespace and the middle of alphabetic words from preview:
|
-- Exclude whitespace and the middle of alphabetic words from preview:
|
||||||
-- foobar[baaz] = quux
|
-- foobar[baaz] = quux
|
||||||
-- ^----^^^--^^-^-^--^
|
-- ^----^^^--^^-^-^--^
|
||||||
require('leap').opts.preview_filter = function(ch0, ch1, ch2)
|
require("leap").opts.preview_filter = function(ch0, ch1, ch2)
|
||||||
return not (
|
return not (ch1:match("%s") or ch0:match("%a") and ch1:match("%a") and ch2:match("%a"))
|
||||||
ch1:match('%s') or
|
|
||||||
ch0:match('%a') and ch1:match('%a') and ch2:match('%a')
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
require('leap.user').set_repeat_keys('<enter>', '<backspace>')
|
require("leap.user").set_repeat_keys("<enter>", "<backspace>")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alexghergh/nvim-tmux-navigation",
|
"alexghergh/nvim-tmux-navigation",
|
||||||
@@ -258,4 +278,4 @@ local plugins = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require("lazy").setup(plugins, {})
|
require("lazy").setup(plugins, {})
|
||||||
@@ -35,9 +35,6 @@ keymap.set("n", "<leader>gf", builtin.git_files, opt)
|
|||||||
keymap.set("n", "<leader>fg", builtin.live_grep, opt)
|
keymap.set("n", "<leader>fg", builtin.live_grep, opt)
|
||||||
keymap.set("n", "<leader>fb", builtin.buffers, opt)
|
keymap.set("n", "<leader>fb", builtin.buffers, opt)
|
||||||
keymap.set("n", "<leader>fh", builtin.help_tags, opt)
|
keymap.set("n", "<leader>fh", builtin.help_tags, opt)
|
||||||
-- keymap.set('n', '<leader>lD', builtin.diagnostics, opt)
|
|
||||||
keymap.set("n", "<leader>ld", builtin.lsp_definitions, opt)
|
|
||||||
keymap.set("n", "<leader>lr", builtin.lsp_references, opt)
|
|
||||||
keymap.set("n", "<leader>ls", builtin.lsp_document_symbols, opt)
|
keymap.set("n", "<leader>ls", builtin.lsp_document_symbols, opt)
|
||||||
keymap.set("n", "<leader>/", builtin.current_buffer_fuzzy_find, opt)
|
keymap.set("n", "<leader>/", builtin.current_buffer_fuzzy_find, opt)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user