Skip to content

Commit

Permalink
feat: adjust lsp settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fbosch committed Aug 8, 2024
1 parent 62099d3 commit b36a1a2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .config/btop/btop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ disk_free_priv = False
show_io_stat = True

#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
io_mode = True

#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
Expand Down
29 changes: 17 additions & 12 deletions .config/nvim/lua/plugins/editor/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ local setup_keymaps = function(client, bufnr)
end

nmap("gD", vim.lsp.buf.declaration, "[G]o to [D]eclaration")
nmap("gd", vim.lsp.buf.definition, "[G]o to [D]efinition")
nmap("gi", vim.lsp.buf.implementation, "[G]o to [I]mplementation")
nmap("gr", vim.lsp.buf.references, "[G]o to [R]eferences")
nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Help")
Expand All @@ -54,11 +55,10 @@ local setup_keymaps = function(client, bufnr)
nmap("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
nmap("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")

if client.name == "tsserver" then
nmap("<leader>rf", ":TSLspRenameFile<cr>", "[R]ename [F]ile")
if client.name == "typescript-tools" then
nmap("<leader>mi", ":TSToolsAddMissingImports<cr>", "[M]issing [I]mports")
nmap("<leader>ui", ":TSToolsRemoveUnusedImport<cr>", "Remove [U]nused [I]mports")
end

nmap("gd", vim.lsp.buf.definition, "[G]o to [D]efinition")
end

local on_attach = function(client, bufnr)
Expand All @@ -84,6 +84,7 @@ return {
},
formatters_by_ft = {
html = web_formatters,
css = web_formatters,
javascript = web_formatters,
javascriptreact = web_formatters,
["javascript.jsx"] = web_formatters,
Expand Down Expand Up @@ -111,6 +112,10 @@ return {
})
end,
},
{
"pmizio/typescript-tools.nvim",
requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
Expand Down Expand Up @@ -216,7 +221,7 @@ return {

local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
"vtsls",
-- "vtsls",
"stylua",
"biome",
"tsserver",
Expand All @@ -234,13 +239,13 @@ return {
local settings = server.settings or {}

if server_name == "tsserver" then
-- using vtsls instead
return
end

if server_name == "vtsls" then
local vtsls = require("vtsls")
lspconfig.vtsls.setup(vtsls.lspconfig)
local typescript_tools = require("typescript-tools")
typescript_tools.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = settings,
root_dir = lspconfig.util.root_pattern("tsconfig.json"),
})
return
end

Expand Down
6 changes: 3 additions & 3 deletions .config/nvim/lua/plugins/workflow/navigation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ return {
{ "tpope/vim-unimpaired", event = "VeryLazy" },
{
"jinh0/eyeliner.nvim",
event = "VeryLazy",
event = "ColorScheme",
config = function()
local colors = require("colors")
vim.api.nvim_set_hl(0, "EyelinerPrimary", { fg = colors.blue, bold = true, underline = true })
vim.api.nvim_set_hl(0, "EyelinerSecondary", { fg = colors.purple, underline = true })
require("eyeliner").setup({
highlight_on_key = true,
dim = true,
})
vim.api.nvim_set_hl(0, "EyelinerPrimary", { fg = colors.blue, bold = true, underline = true })
vim.api.nvim_set_hl(0, "EyelinerSecondary", { fg = colors.purple, underline = true })
end,
},
{
Expand Down
8 changes: 8 additions & 0 deletions .config/nvim/spell/en.utf-8.add
Original file line number Diff line number Diff line change
Expand Up @@ -1231,3 +1231,11 @@ in-term
dueDate
payDate
companyId
fixedInterestPeriodType
maturityDateUnadjusted
datepicker
principalValueDate
saturday
consistent-type-assertions
eslint-disable-line
dot-notation
Binary file modified .config/nvim/spell/en.utf-8.add.spl
Binary file not shown.

0 comments on commit b36a1a2

Please sign in to comment.