Skip to content

Instantly share code, notes, and snippets.

View dapicester's full-sized avatar

Paolo D'Apice dapicester

View GitHub Profile
@dapicester
dapicester / store_page_on_session
Created June 14, 2016 09:43 — forked from CootCraig/store_page_on_session
storing page on session for will_paginate
class ApplicationController < ActionController::Base
...
before_filter :page_params, :only => :index
def page_key
(self.class.to_s + "_page").to_sym
end
# Use a before_filter on index action to remember the current page
@dapicester
dapicester / lualine.lua
Created November 9, 2023 10:00 — forked from Lamarcke/lualine.lua
Lualine config for LSP clients, formatters and linters
-- Returns a string with a list of attached LSP clients, including
-- formatters and linters from null-ls, nvim-lint and formatter.nvim
local function get_attached_clients()
local buf_clients = vim.lsp.get_active_clients({ bufnr = 0 })
if #buf_clients == 0 then
return "LSP Inactive"
end
local buf_ft = vim.bo.filetype