Compare commits
3 commits
bd5bf2bfce
...
1800e5d2e1
Author | SHA1 | Date | |
---|---|---|---|
|
1800e5d2e1 | ||
|
b286bcaa74 | ||
|
6e103f4bff |
5 changed files with 55 additions and 6 deletions
|
@ -13,7 +13,6 @@
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "4455bb5364d29ff86639dfd5533d4fe4b48192d4" },
|
"gitsigns.nvim": { "branch": "main", "commit": "4455bb5364d29ff86639dfd5533d4fe4b48192d4" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "f145e6f42a56306c5536e9efbfe41f7efbec285d" },
|
"lazy.nvim": { "branch": "main", "commit": "f145e6f42a56306c5536e9efbfe41f7efbec285d" },
|
||||||
"leap.nvim": { "branch": "main", "commit": "14b5a65190fe69388a8f59c695ed3394a10d6af8" },
|
"leap.nvim": { "branch": "main", "commit": "14b5a65190fe69388a8f59c695ed3394a10d6af8" },
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "17ff7a405fea8376b015b8ea7910d2e59958bf68" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "5230617372e656d4a2e1e236e03bf7e7b4b97273" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "5230617372e656d4a2e1e236e03bf7e7b4b97273" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" },
|
"mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" },
|
||||||
|
@ -41,6 +40,7 @@
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
|
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "161114bd39b990995e08dbf941f6821afbdcd666" },
|
"tokyonight.nvim": { "branch": "main", "commit": "161114bd39b990995e08dbf941f6821afbdcd666" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "2af0dd9767526410c88c628f1cbfcb6cf22dd683" },
|
"trouble.nvim": { "branch": "main", "commit": "2af0dd9767526410c88c628f1cbfcb6cf22dd683" },
|
||||||
|
"typescript.nvim": { "branch": "main", "commit": "5b3680e5c386e8778c081173ea0c978c14a40ccb" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
|
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
|
||||||
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
||||||
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
||||||
|
|
|
@ -163,6 +163,26 @@ keymap("i", "<Down>", "<Nop>", opts)
|
||||||
-- end
|
-- end
|
||||||
--
|
--
|
||||||
-- keymap("n", "<leader>n", clean_screen, opts)
|
-- keymap("n", "<leader>n", clean_screen, opts)
|
||||||
|
|
||||||
|
function vim.getVisualSelection()
|
||||||
|
vim.cmd('noau normal! "vy"')
|
||||||
|
local text = vim.fn.getreg('v')
|
||||||
|
vim.fn.setreg('v', {})
|
||||||
|
|
||||||
|
text = string.gsub(text, "\n", "")
|
||||||
|
if #text > 0 then
|
||||||
|
return text
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
keymap('v', '<space>sw', function()
|
||||||
|
local tb = require('telescope.builtin')
|
||||||
|
local text = vim.getVisualSelection()
|
||||||
|
tb.live_grep({ default_text = text })
|
||||||
|
end, opts)
|
||||||
|
|
||||||
--
|
--
|
||||||
-- local function otherkeymaps()
|
-- local function otherkeymaps()
|
||||||
-- local ok
|
-- local ok
|
||||||
|
@ -186,7 +206,8 @@ keymap("i", "<Down>", "<Nop>", opts)
|
||||||
-- prefix = "<leader>"
|
-- prefix = "<leader>"
|
||||||
-- })
|
-- })
|
||||||
-- end
|
-- end
|
||||||
keymap("v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
|
-- keymap("n", "<leader>lf", "<cmd>lua vim.lsp.buf.format()<cr>", opts)
|
||||||
keymap("x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
|
-- keymap("v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
|
||||||
|
-- keymap("x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
|
||||||
--
|
--
|
||||||
-- otherkeymaps()
|
-- otherkeymaps()
|
||||||
|
|
|
@ -11,7 +11,9 @@ require("lazy").setup({
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import any extras modules here
|
-- import any extras modules here
|
||||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||||
|
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||||
-- import/override with your plugins
|
-- import/override with your plugins
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
vim.opt.relativenumber = false
|
vim.opt.relativenumber = false
|
||||||
vim.opt.conceallevel = 0
|
vim.opt.conceallevel = 0
|
||||||
-- vim.opt.completeopt = { "menuone", "noselect" }
|
|
||||||
vim.opt.timeoutlen = 1000
|
vim.opt.timeoutlen = 1000
|
||||||
vim.opt.list = false
|
vim.opt.list = false
|
||||||
vim.opt.pumblend = 0
|
vim.opt.pumblend = 0
|
||||||
-- vim.opt.cmdheight = 1
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
|
26
lua/plugins/lsp.lua
Normal file
26
lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
init = function()
|
||||||
|
local format = function()
|
||||||
|
require("lazyvim.plugins.lsp.format").format({ force = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
|
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Document", has = "documentFormatting" }
|
||||||
|
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
autoformat = false,
|
||||||
|
servers = {
|
||||||
|
yamlls = {
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
keyOrdering = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in a new issue