This commit is contained in:
parent
7e5d880156
commit
d93f63cf82
40 changed files with 448 additions and 649 deletions
1
.config/nvim/.gitignore
vendored
Normal file
1
.config/nvim/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.luarc.json
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"workspace.library": [
|
||||
"/home/wzray/.local/share/nvim/lazy/neodev.nvim/types/stable",
|
||||
"/usr/share/nvim/runtime/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-surround/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/telescope-fzf-native.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-tree.lua/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/cmp-nvim-lsp/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/cmp-buffer/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/lspkind.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/lualine.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-web-devicons/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-treesitter-textobjects/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-treesitter-context/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-treesitter/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/indent-blankline.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-notify/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-colorizer.lua/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/mason.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/lazy.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/LuaSnip/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-lastplace/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/telescope.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/Navigator.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/trouble.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/bufferline.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/Comment.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-lspconfig/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/neodev.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/onedark.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/plenary.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/fidget.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-autopairs/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/todo-comments.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-cmp/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/telescope-emoji.nvim/lua",
|
||||
"/usr/share/nvim/runtime",
|
||||
"/home/wzray/.dotfiles/.config/nvim/lua",
|
||||
"${3rd}/luv/library"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,43 +1,55 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c1851d5c519611dfc451b6582961b2602e0af89b" },
|
||||
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
|
||||
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"iptables": { "branch": "master", "commit": "0d18b1e468f547dd7e2c494d42bc134a1e0eac7e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
|
||||
"multilayout.nvim": { "branch": "main", "commit": "613ec4ace9097a4464a558777aaf6a15b3d8bd78" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
||||
"lua-async-await": { "branch": "main", "commit": "652d94df34e97abe2d4a689edbc4270e7ead1a98" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"multilayout.nvim": { "branch": "main", "commit": "105f22f6329f19a1824f58774d1899f2a69a5e77" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "106c4bcc053a5da783bf4a9d907b6f22485c2ea0" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "4c0e3a98465fac963dfde898cc8b878094153a43" },
|
||||
"nvim-java": { "branch": "main", "commit": "3d56b7461facb42f135e25b2636bf220a7f0ed42" },
|
||||
"nvim-java-core": { "branch": "main", "commit": "229ebcdfa33c75cf746f97c46c2893b2de3626e5" },
|
||||
"nvim-java-dap": { "branch": "main", "commit": "55f239532f7a3789d21ea68d1e795abc77484974" },
|
||||
"nvim-java-refactor": { "branch": "main", "commit": "b51a57d862338999059e1d1717df3bc80a3a15c0" },
|
||||
"nvim-java-test": { "branch": "main", "commit": "7f0f40e9c5b7eab5096d8bec6ac04251c6e81468" },
|
||||
"nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "e7d1b7dadc62fe2eccc17d814354b0a5688621ce" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0e3be38005e9673d044e994b1e4b123adb040179" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "11de4da47f3e69cb70c3ae9816bd8af166cbe121" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "2010fc6ec03e2da552b4886fceb2f7bc0fc2e9c0" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "68c67adfabfd1ce923839570507ef2e81ab8a408" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "918e89e6993b2901eea47b9f4eb666d53c2542a6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"quickfix-reflector.vim": { "branch": "master", "commit": "6a6a9e28e1713b9e9db99eec1e6672e5666c01b9" },
|
||||
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
|
||||
"telescope-emoji.nvim": { "branch": "master", "commit": "86248d97be84a1ce83f0541500ef9edc99ea2aa1" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"vim-bbcode": { "branch": "master", "commit": "6fb28c6deae5844ee2bf0b97ef2fea04bd3d4eac" },
|
||||
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||
"vim-caddyfile": { "branch": "master", "commit": "6d60d5af0d73f20b88ec388a9d70188d55ed8223" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"vim-nftables": { "branch": "master", "commit": "26f8a506c6f3e41f1e4a8d6aa94c9a79a666bbff" },
|
||||
"vim-peekaboo": { "branch": "master", "commit": "cc4469c204099c73dd7534531fa8ba271f704831" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
|
||||
"vim-peekaboo": { "branch": "master", "commit": "2a8a3187ba6b15201b2563a3f0331fcdf49da36c" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"vim-wakatime": { "branch": "master", "commit": "d7973b157a632d1edeff01818f18d67e584eeaff" }
|
||||
}
|
||||
|
|
|
|||
36
.config/nvim/lua/config/filetypes.lua
Normal file
36
.config/nvim/lua/config/filetypes.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
local function has_ansible_root(path, recursive)
|
||||
if not recursive then
|
||||
return vim.uv.fs_stat(
|
||||
vim.fs.joinpath(vim.fs.dirname(path), 'ansible.cfg')
|
||||
)
|
||||
end
|
||||
|
||||
return vim.fs.find('ansible.cfg', {
|
||||
path = vim.fs.dirname(path),
|
||||
upward = true,
|
||||
limit = 1
|
||||
})[1]
|
||||
end
|
||||
|
||||
local function yaml_filetype(recursive, p2)
|
||||
return function (path)
|
||||
print(p2)
|
||||
if has_ansible_root(path, recursive) then
|
||||
return "yaml.ansible"
|
||||
else
|
||||
return "yaml"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
['yaml'] = yaml_filetype(false),
|
||||
['yml'] = yaml_filetype(false),
|
||||
},
|
||||
pattern = {
|
||||
[".*/roles/.*/tasks/.*%.ya?ml"] = yaml_filetype(true),
|
||||
[".*/roles/.*/handlers/.*%.ya?ml"] = yaml_filetype(true),
|
||||
[".*/playbooks/.*%.ya?ml"] = yaml_filetype(true),
|
||||
},
|
||||
})
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
require("config.mappings")
|
||||
require("config.options")
|
||||
require("config.mappings")
|
||||
require("config.autocmd")
|
||||
require("config.filetypes")
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ map({ 'n', 'v' }, 'j', 'v:count == 0 ? "gj" : "j"', { expr = true, silent = true
|
|||
|
||||
-- Copy and paste from clipboard
|
||||
map({ 'n', 'v' }, '<leader>y', '"+y')
|
||||
map({ 'n', 'v' }, '<leader>Y', '"+Y')
|
||||
map({ 'n', 'v' }, '<leader>Y', '"+y$')
|
||||
map({ 'n', 'v' }, '<leader>p', '"+p<ESC>')
|
||||
map({ 'n', 'v' }, '<leader>P', '"+P<ESC>')
|
||||
|
||||
|
|
@ -49,3 +49,8 @@ map('i', '<M-BS>', '<C-w>')
|
|||
-- Move lines quickly
|
||||
map('n', '<C-M-k>', ':m-2<CR>', { silent = true })
|
||||
map('n', '<C-M-j>', ':m+1<CR>', { silent = true })
|
||||
|
||||
map('n', '<Leader>dt', ':diffthis<CR>', { silent = true })
|
||||
map('n', '<Leader>do', ':diffoff<CR>', { silent = true })
|
||||
|
||||
map('n', '<Leader>lr', ':LspR<CR>')
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ local servers = {
|
|||
yamlls = require('lsp.yamlls'),
|
||||
}
|
||||
|
||||
vim.lsp.set_log_level('info')
|
||||
-- vim.lsp.set_log_level('info')
|
||||
|
||||
local on_attach = function(_, bufnr)
|
||||
local nmap = function(keys, func)
|
||||
|
|
@ -33,6 +33,10 @@ local on_attach = function(_, bufnr)
|
|||
nmap('gr', require('telescope.builtin').lsp_references)
|
||||
nmap('gt', require('telescope.builtin').lsp_type_definitions)
|
||||
|
||||
-- nmap('gd', vim.lsp.buf.definition)
|
||||
-- nmap('gr', vim.lsp.buf.references)
|
||||
-- nmap('gt', vim.lsp.buf.type_definition)
|
||||
|
||||
nmap('<leader>sd', require('telescope.builtin').diagnostics)
|
||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols)
|
||||
nmap('<leader>as', require('telescope.builtin').lsp_dynamic_workspace_symbols)
|
||||
|
|
@ -42,17 +46,22 @@ local on_attach = function(_, bufnr)
|
|||
nmap('<C-k>', vim.lsp.buf.signature_help)
|
||||
|
||||
nmap('gI', require('telescope.builtin').lsp_implementations)
|
||||
-- nmap('gI', vim.lsp.buf.implementation)
|
||||
nmap('gD', vim.lsp.buf.declaration)
|
||||
|
||||
nmap('<leader>F', vim.lsp.buf.format)
|
||||
end
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lspconfig = require('lspconfig')
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true
|
||||
}
|
||||
|
||||
for server_name, config in pairs(servers) do
|
||||
lspconfig[server_name].setup(vim.tbl_deep_extend('keep', {
|
||||
vim.lsp.config(server_name, vim.tbl_deep_extend('keep', {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}, config))
|
||||
vim.lsp.enable(server_name)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
return {
|
||||
'Winseven4lyf/vim-bbcode',
|
||||
'isobit/vim-caddyfile',
|
||||
'junegunn/vim-peekaboo',
|
||||
'nfnty/vim-nftables',
|
||||
'rcarriga/nvim-notify',
|
||||
'stefandtw/quickfix-reflector.vim',
|
||||
'nfnty/vim-nftables',
|
||||
'tpope/vim-fugitive',
|
||||
'junegunn/vim-peekaboo',
|
||||
'tpope/vim-sleuth',
|
||||
'vim-scripts/iptables',
|
||||
{ 'akinsho/bufferline.nvim', opts = {}, dependencies = { 'navarasu/onedark.nvim' } },
|
||||
|
|
@ -13,36 +14,7 @@ return {
|
|||
{ 'kylechui/nvim-surround', version = '*', event = 'VeryLazy', opts = {} },
|
||||
{ 'lukas-reineke/indent-blankline.nvim', main = 'ibl', opts = {} },
|
||||
{ 'norcalli/nvim-colorizer.lua', opts={ '*' }, dependencies = { 'navarasu/onedark.nvim' } },
|
||||
-- { 'wakatime/vim-wakatime', event = 'VeryLazy' },
|
||||
{ 'wakatime/vim-wakatime', event = 'VeryLazy' },
|
||||
{ 'williamboman/mason.nvim', opts = {} },
|
||||
'Winseven4lyf/vim-bbcode',
|
||||
|
||||
|
||||
{ 'mrsobakin/multilayout.nvim' , opts = {
|
||||
layouts = {
|
||||
ru = {
|
||||
-- Names of this layout, as `libukb` reports.
|
||||
names = { "Russian" },
|
||||
from = [[ёйцукенгшщзхъфывапролджэячсмитьбю.Ё"№;:?ЙЦУКЕНГШЩЗХЪ/ФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,]],
|
||||
to = [[`qwertyuiop[]asdfghjkl;'zxcvbnm,./~@#$^&QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]],
|
||||
}
|
||||
},
|
||||
aliases = {
|
||||
-- Maximum length of default commands aliases.
|
||||
-- Increasing this value leads to longer startup times.
|
||||
max_length = 2,
|
||||
-- Extra commands that you want to alias.
|
||||
-- They are aliased regardless of `max_length`.
|
||||
extra = { "sort" },
|
||||
},
|
||||
-- Whether to use `libukb`. If this is set to false, `langmap`
|
||||
-- won't automatically switch when your layout does.
|
||||
use_libukb = true,
|
||||
-- Path to the `libukb.so`. If `nil`, ukb will be automatically
|
||||
-- downloaded, builded and installed in the neovim data directory.
|
||||
libukb_path = nil,
|
||||
-- Function of type `callback(layout: string)`. Called whenever
|
||||
-- current keyboard layout changes.
|
||||
callback = nil,
|
||||
}}
|
||||
{ dir = '~/.local/share/nvim/preseed/' }, -- 'https://git.netizen.se/vim-preseed',
|
||||
}
|
||||
|
|
|
|||
30
.config/nvim/lua/plugins/multilayout.lua
Normal file
30
.config/nvim/lua/plugins/multilayout.lua
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
return {
|
||||
'mrsobakin/multilayout.nvim',
|
||||
opts = {
|
||||
layouts = {
|
||||
ru = {
|
||||
-- Names of this layout, as `libukb` reports.
|
||||
names = { "Russian" },
|
||||
from = [[ёйцукенгшщзхъфывапролджэячсмитьбю.Ё"№;:?ЙЦУКЕНГШЩЗХЪ/ФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,]],
|
||||
to = [[`qwertyuiop[]asdfghjkl;'zxcvbnm,./~@#$^&QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]],
|
||||
}
|
||||
},
|
||||
aliases = {
|
||||
-- Maximum length of default commands aliases.
|
||||
-- Increasing this value leads to longer startup times.
|
||||
max_length = 2,
|
||||
-- Extra commands that you want to alias.
|
||||
-- They are aliased regardless of `max_length`.
|
||||
extra = { "sort" },
|
||||
},
|
||||
-- Whether to use `libukb`. If this is set to false, `langmap`
|
||||
-- won't automatically switch when your layout does.
|
||||
use_libukb = true,
|
||||
-- Path to the `libukb.so`. If `nil`, ukb will be automatically
|
||||
-- downloaded, builded and installed in the neovim data directory.
|
||||
libukb_path = nil,
|
||||
-- Function of type `callback(layout: string)`. Called whenever
|
||||
-- current keyboard layout changes.
|
||||
callback = nil,
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ return {
|
|||
|
||||
config = function()
|
||||
local actions = require('telescope.actions')
|
||||
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
|
|
@ -18,8 +19,12 @@ return {
|
|||
['<C-d>'] = false,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||
-- ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||
["<C-b>"] = require("trouble.sources.telescope").open
|
||||
},
|
||||
n = {
|
||||
["<C-q>"] = require("trouble.sources.telescope").open
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -34,11 +39,17 @@ return {
|
|||
})
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').live_grep)
|
||||
vim.keymap.set('n', '<leader>wf', require('telescope.builtin').grep_string)
|
||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').live_grep)
|
||||
vim.keymap.set('n', '<leader>wf', require('telescope.builtin').grep_string)
|
||||
vim.keymap.set('n', '<leader>of', require('telescope.builtin').oldfiles)
|
||||
vim.keymap.set('n', '<leader>af', require('telescope.builtin').git_files)
|
||||
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files)
|
||||
vim.keymap.set('n', '<leader>.', require('telescope').extensions.emoji.emoji)
|
||||
|
||||
|
||||
-- Use this to add more results without clearing the trouble list
|
||||
-- local add_to_trouble = require("trouble.sources.telescope").add
|
||||
|
||||
local telescope = require("telescope")
|
||||
end
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,5 +38,6 @@ return {
|
|||
}
|
||||
vim.o.termguicolors = true
|
||||
vim.cmd.colorscheme 'onedark'
|
||||
vim.cmd.hi 'clear @spell'
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,23 @@
|
|||
return {
|
||||
-- 'kevinhwang91/nvim-ufo',
|
||||
-- dependencies = {
|
||||
-- 'kevinhwang91/promise-async'
|
||||
-- },
|
||||
-- config = function()
|
||||
-- vim.defer_fn(function()
|
||||
-- vim.o.foldcolumn = '0'
|
||||
-- vim.o.foldlevel = 99
|
||||
-- vim.o.foldlevelstart = 99
|
||||
-- vim.o.foldenable = true
|
||||
--
|
||||
-- vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
-- vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
--
|
||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
-- capabilities.textDocument.foldingRange = {
|
||||
-- dynamicRegistration = false,
|
||||
-- lineFoldingOnly = true
|
||||
-- }
|
||||
-- local language_servers = vim.lsp.get_clients()
|
||||
-- for _, ls in ipairs(language_servers) do
|
||||
-- require('lspconfig')[ls].setup({
|
||||
-- capabilities = capabilities
|
||||
-- })
|
||||
-- end
|
||||
-- require('ufo').setup()
|
||||
-- end, 0)
|
||||
-- end
|
||||
'kevinhwang91/nvim-ufo',
|
||||
dependencies = {
|
||||
'kevinhwang91/promise-async'
|
||||
},
|
||||
config = function()
|
||||
vim.defer_fn(function()
|
||||
vim.o.foldcolumn = '0'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
|
||||
require('ufo').setup({
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return {'treesitter', 'indent'}
|
||||
end
|
||||
})
|
||||
end, 0)
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue