ダブルクォートの廃止とキーマッピングの変更
This commit is contained in:
parent
2f764a45bc
commit
e8018c2f61
1 changed files with 35 additions and 35 deletions
70
init.lua
70
init.lua
|
@ -274,9 +274,9 @@ options = {
|
||||||
--telescope
|
--telescope
|
||||||
require('telescope').setup({
|
require('telescope').setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
borderchars = { "─", "│", "─", "│", "┌", "┐", "┘", "└" },
|
borderchars = { '─', '│', '─', '│', '┌', '┐', '┘', '└' },
|
||||||
color_devicons = true,
|
color_devicons = true,
|
||||||
file_ignore_patterns = { 'node_modules', '.git', '.svg', '.npm', 'go', 'MEGA'},
|
file_ignore_patterns = { 'node_modules', '.git', '.svg', '.npm', 'go' },
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
['<esc>'] = require('telescope.actions').close,
|
['<esc>'] = require('telescope.actions').close,
|
||||||
|
@ -325,12 +325,12 @@ local on_attach = function(client, bufnr)
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
local set = vim.keymap.set
|
local set = vim.keymap.set
|
||||||
set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
||||||
set('n', 'ls', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
|
set('n', '<leader>1', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
|
||||||
set('n', 'ln', '<cmd>lua vim.lsp.buf.rename()<CR>')
|
set('n', '<leader>2', '<cmd>lua vim.lsp.buf.rename()<CR>')
|
||||||
set('n', 'la', '<cmd>lua vim.lsp.buf.code_action()<CR>')
|
set('n', '<leader>3', '<cmd>lua vim.lsp.buf.code_action()<CR>')
|
||||||
set('n', 'l[', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>')
|
set('n', '<leader>[', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>')
|
||||||
set('n', 'l]', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>')
|
set('n', '<leaaer>]', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>')
|
||||||
set('n', 'lf', '<cmd>lua vim.lsp.buf.format {async = true}<CR>')
|
set('n', '<leader>4', '<cmd>lua vim.lsp.buf.format {async = true}<CR>')
|
||||||
end
|
end
|
||||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = false })
|
vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = false })
|
||||||
|
@ -365,60 +365,60 @@ map("n", "<leader><leader>d", ":lua require'dapui'.eval()<CR>", { silent = true}
|
||||||
|
|
||||||
|
|
||||||
---DAP-UI
|
---DAP-UI
|
||||||
require("dapui").setup({
|
require('dapui').setup({
|
||||||
icons = { expanded = "▾", collapsed = "▸", current_frame = "▸" },
|
icons = { expanded = '▾', collapsed = '▸', current_frame = '▸' },
|
||||||
mappings = {
|
mappings = {
|
||||||
-- Use a table to apply multiple mappings
|
-- Use a table to apply multiple mappings
|
||||||
expand = { "<CR>", "<2-LeftMouse>" },
|
expand = { '<CR>', '<2-LeftMouse>' },
|
||||||
open = "o",
|
open = 'o',
|
||||||
remove = "d",
|
remove = 'd',
|
||||||
edit = "e",
|
edit = 'e',
|
||||||
repl = "r",
|
repl = 'r',
|
||||||
toggle = "t",
|
toggle = 't',
|
||||||
},
|
},
|
||||||
expand_lines = vim.fn.has("nvim-0.7") == 1,
|
expand_lines = vim.fn.has('nvim-0.7') == 1,
|
||||||
layouts = {
|
layouts = {
|
||||||
{
|
{
|
||||||
elements = {
|
elements = {
|
||||||
-- Elements can be strings or table with id and size keys.
|
-- Elements can be strings or table with id and size keys.
|
||||||
{ id = "scopes", size = 0.25 },
|
{ id = 'scopes', size = 0.25 },
|
||||||
"breakpoints",
|
'breakpoints',
|
||||||
"stacks",
|
'stacks',
|
||||||
"watches",
|
'watches',
|
||||||
},
|
},
|
||||||
size = 40, -- 40 columns
|
size = 40, -- 40 columns
|
||||||
position = "left",
|
position = 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
elements = {
|
elements = {
|
||||||
"repl",
|
'repl',
|
||||||
},
|
},
|
||||||
size = 0.25, -- 25% of total lines
|
size = 0.25, -- 25% of total lines
|
||||||
position = "bottom",
|
position = 'bottom',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
controls = {
|
controls = {
|
||||||
-- Requires Neovim nightly (or 0.8 when released)
|
-- Requires Neovim nightly (or 0.8 when released)
|
||||||
enabled = true,
|
enabled = true,
|
||||||
-- Display controls in this element
|
-- Display controls in this element
|
||||||
element = "repl",
|
element = 'repl',
|
||||||
icons = {
|
icons = {
|
||||||
pause = "",
|
pause = '',
|
||||||
play = "",
|
play = '',
|
||||||
step_into = "",
|
step_into = '',
|
||||||
step_over = "",
|
step_over = '',
|
||||||
step_out = "",
|
step_out = '',
|
||||||
step_back = "",
|
step_back = '',
|
||||||
run_last = "↻",
|
run_last = '↻',
|
||||||
terminate = "□",
|
terminate = '□',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
floating = {
|
floating = {
|
||||||
max_height = nil, -- These can be integers or a float between 0 and 1.
|
max_height = nil, -- These can be integers or a float between 0 and 1.
|
||||||
max_width = nil, -- Floats will be treated as percentage of your screen.
|
max_width = nil, -- Floats will be treated as percentage of your screen.
|
||||||
border = "single", -- Border style. Can be "single", "double" or "rounded"
|
border = 'single', -- Border style. Can be "single", "double" or "rounded"
|
||||||
mappings = {
|
mappings = {
|
||||||
close = { "q", "<Esc>" },
|
close = { 'q', '<Esc>' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
windows = { indent = 1 },
|
windows = { indent = 1 },
|
||||||
|
|
Loading…
Reference in a new issue