Various fixes from mac

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:03 -05:00
parent 9a1c59026f
commit b220cc8ab1
3 changed files with 36 additions and 1 deletions

View File

@ -3,5 +3,30 @@ local on_attach = require('plugins.lsp.on_attach')
require('typescript').setup({
server = { -- pass options to lspconfig's setup method
on_attach = on_attach,
root_dir = require('lspconfig').util.find_git_ancestor,
settings = {
javascript = {
inlayHints = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all';
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = true,
},
},
typescript = {
inlayHints = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all';
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = true,
},
},
},
},
})

View File

@ -40,3 +40,5 @@ end
-- vim.keymap.set('x', '<leader>S', [[<Plug>(sqls-execute-query-vertical)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query in vertical split" })
vim.keymap.set("n", "<leader>bo", "<cmd>%bd|e#<cr>", { desc = "Close all buffers but the current one" }) -- https://stackoverflow.com/a/42071865/516188
vim.g.neovide_input_macos_alt_is_meta = true

View File

@ -37,7 +37,7 @@ vim.opt.titlestring="%{substitute(getcwd(),$HOME,'~','')} - Neovide"
vim.g.mapleader = ' '
-- Fonts
vim.opt.guifont = 'Hack:h9.3'
vim.opt.guifont = 'Berkeley Mono Variable:h10'
-- Swap / backup / undo
vim.opt.undofile = true
@ -98,3 +98,11 @@ vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, {
vim.opt.fillchars:append { diff = "" }
vim.api.nvim_command([[colorscheme gruvbox]])
vim.api.nvim_create_user_command(
'Browse',
function (opts)
vim.fn.system { 'open', opts.fargs[1] }
end,
{ nargs = 1 }
)