Add Remaps, LSPs, Autoformats
This commit is contained in:
parent
eea55b9dd8
commit
b129b4832b
20
init.lua
20
init.lua
|
@ -119,6 +119,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
||||||
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
||||||
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
||||||
|
|
||||||
|
-- [[ Additional Remaps ]]
|
||||||
|
vim.keymap.set('n', '<leader>pv', '<cmd>:Ex<CR>')
|
||||||
|
vim.keymap.set('n', '<leader>x', '<cmd>:so<CR>')
|
||||||
|
vim.keymap.set('n', '<leader>fc', '<cmd>:fc<CR>')
|
||||||
|
vim.keymap.set('n', '<leader>cr', '<cmd>:%s/\r//g')
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]]
|
-- [[ Basic Autocommands ]]
|
||||||
-- See `:help lua-guide-autocommands`
|
-- See `:help lua-guide-autocommands`
|
||||||
|
|
||||||
|
@ -585,10 +591,14 @@ require('lazy').setup({
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
gopls = {},
|
||||||
-- gopls = {},
|
pyright = {},
|
||||||
-- pyright = {},
|
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
|
elixir-ls = {},
|
||||||
|
lexical = {},
|
||||||
|
ruff = {},
|
||||||
|
sqls = {},
|
||||||
|
zls = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
|
@ -683,7 +693,9 @@ require('lazy').setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
python = { 'black', 'ruff' },
|
||||||
|
go = { 'gofumpt },
|
||||||
|
sql = { 'sql-formatter' },
|
||||||
--
|
--
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
|
|
Loading…
Reference in New Issue